File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
app/lib/presentation/navigation Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1- import 'package:app/main/init.dart' ;
21import 'package:app/presentation/ui/pages/home/home_page.dart' ;
32import 'package:app/presentation/ui/pages/login/login_page.dart' ;
43import 'package:app/presentation/ui/pages/sign_up/sign_up_page.dart' ;
@@ -58,7 +57,7 @@ class Routers {
5857 name: Routes .auth.name,
5958 path: Routes .auth.path,
6059 redirect: (context, state) {
61- if (getIt <AuthCubit >().isLoggedIn ()) {
60+ if (context. read <AuthCubit >().isLoggedIn ()) {
6261 return '${Routes .app .path }${Routes .home .path }' ;
6362 }
6463
@@ -82,7 +81,7 @@ class Routers {
8281 path: Routes .app.path,
8382 builder: (context, state) => const SplashPage (),
8483 redirect: (context, state) {
85- if (! getIt <AuthCubit >().isLoggedIn ()) {
84+ if (! context. read <AuthCubit >().isLoggedIn ()) {
8685 return '${Routes .auth .path }${Routes .login .path }' ;
8786 }
8887
You can’t perform that action at this time.
0 commit comments