go router

This commit is contained in:
mso7nueh
2024-06-05 12:52:03 +03:00
parent ed0c3fcef1
commit 1951edd8f8
28 changed files with 1160 additions and 1448 deletions

View File

@@ -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');
};
}