forked from eatvio/eatvio_app
fix(navigation): remove animation between pages
This commit is contained in:
@@ -62,32 +62,42 @@ class AppRouter {
|
||||
},
|
||||
routes: [
|
||||
GoRoute(
|
||||
pageBuilder: (context, state) => NoTransitionPage(child: MyProfileScreen()),
|
||||
path: '/my-profile-screen',
|
||||
name: 'myProfileScreen',
|
||||
redirect: (context, state) async {
|
||||
await context.read<InitializationCubit>().runInitialization();
|
||||
return null;
|
||||
},
|
||||
builder: (context, state) => MyProfileScreen(),
|
||||
// builder: (context, state) => MyProfileScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
pageBuilder: (context, state) => NoTransitionPage(child: FeedScreen()),
|
||||
path: '/feed-screen',
|
||||
name: 'feedScreen',
|
||||
builder: (context, state) => FeedScreen(),
|
||||
// builder: (context, state) => FeedScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/diary-screen',
|
||||
name: 'diaryScreen',
|
||||
builder: (context, state) {
|
||||
if (state.extra != null)
|
||||
return DiaryScreen(diaryID: state.extra as String);
|
||||
else
|
||||
return DiaryScreen(diaryID: '0');
|
||||
}),
|
||||
pageBuilder: (context, state) {
|
||||
if (state.extra != null)
|
||||
return NoTransitionPage(child: DiaryScreen(diaryID: state.extra as String));
|
||||
else
|
||||
return NoTransitionPage(child: DiaryScreen(diaryID: '0'));
|
||||
},
|
||||
path: '/diary-screen',
|
||||
name: 'diaryScreen',
|
||||
// builder: (context, state) {
|
||||
// if (state.extra != null)
|
||||
// return DiaryScreen(diaryID: state.extra as String);
|
||||
// else
|
||||
// return DiaryScreen(diaryID: '0');
|
||||
// },
|
||||
),
|
||||
GoRoute(
|
||||
pageBuilder: (context, state) => NoTransitionPage(child: ChatSelectScreen()),
|
||||
path: '/chat-select-screen',
|
||||
name: 'chatSelectScreen',
|
||||
builder: (context, state) => ChatSelectScreen(),
|
||||
// builder: (context, state) => ChatSelectScreen(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user