fixing the app launch bug
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user