fixing the app launch bug

This commit is contained in:
2026-07-27 11:06:04 +03:00
parent d5f70ee9c4
commit c9b8d143d1
5 changed files with 26 additions and 19 deletions

View File

@@ -296,13 +296,19 @@ class AppRouter {
//Sub screens
GoRoute(
path: 'profile',
builder: (context, state) =>
BlocProvider(
create: (context) =>
getIt<ProfileBloc>()
..add(ProfileStarted()),
child: ProfileScreen(),
),
builder: (context, state) {
final bloc = getIt<ProfileBloc>();
if (!bloc.isClosed) {
bloc.add(ProfileStarted());
}
return BlocProvider.value(
value: bloc,
child: const ProfileScreen(),
);
},
routes: [
GoRoute(
path: 'edit',