add filter panel to calculator
This commit is contained in:
@@ -84,8 +84,9 @@ class _MyAppState extends State<MyApp> {
|
||||
redirect: (context, state) {
|
||||
final loggedIn = auth.isLoggedIn;
|
||||
final loggingIn = state.uri.toString() == '/login';
|
||||
final atSettings = state.uri.toString() == '/settings';
|
||||
|
||||
if (!loggedIn && !loggingIn) return '/login';
|
||||
if (!loggedIn && !loggingIn && !atSettings) return '/login';
|
||||
if (loggedIn && loggingIn) return '/';
|
||||
return null;
|
||||
},
|
||||
@@ -155,13 +156,13 @@ class _MyAppState extends State<MyApp> {
|
||||
return NewEntryPage(editLegId: legId);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
path: '/settings',
|
||||
builder: (context, state) => const SettingsPage(),
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRoute(path: '/login', builder: (context, state) => const LoginScreen()),
|
||||
GoRoute(
|
||||
path: '/settings',
|
||||
builder: (context, state) => const SettingsPage(),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user