This commit is contained in:
BLoC
2025-02-12 15:04:47 +03:00
61 changed files with 2211 additions and 1170 deletions

View File

@@ -59,7 +59,6 @@ class AppRouter {
path: '/auth-screen',
name: 'authScreen',
redirect: (context, state) async {
// TokenStorage.removeTokenInStorage();
if (await TokenStorage.haveTokenInStorage()) {
return '/my-profile-screen';
}
@@ -292,7 +291,10 @@ class AppRouter {
GoRoute(
path: CreateDietScreen.path,
name: CreateDietScreen.name,
builder: (context, state) => CreateDietScreen(),
builder: (context, state) {
final diet = state.extra as Diet?;
return CreateDietScreen(diet: diet);
},
),
GoRoute(
path: DietPreviewScreen.path,