forked from eatvio/eatvio_app
go router
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import 'bloc/auth_bloc.dart';
|
||||
import 'models/auth_model.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
@@ -101,10 +103,7 @@ class AuthScreen extends StatelessWidget {
|
||||
final box = await Hive.openBox('token');
|
||||
final token = res['token'];
|
||||
box.put('token', token);
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
AppRoutes.myProfile,
|
||||
);
|
||||
GoRouter.of(context).go('/my-profile-screen');
|
||||
} else {
|
||||
showDialog(
|
||||
context: context,
|
||||
@@ -164,7 +163,7 @@ class AuthScreen extends StatelessWidget {
|
||||
|
||||
onTapNoAccount(BuildContext context) {
|
||||
return () {
|
||||
Navigator.pushNamed(context, AppRoutes.languageSelectScreen);
|
||||
GoRouter.of(context).goNamed('languageSelectScreen');
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user