about naviation fix

This commit is contained in:
2024-09-16 16:06:30 +02:00
parent 1b4c68f805
commit 1f75a6fe7f
2 changed files with 7 additions and 10 deletions

View File

@@ -23,7 +23,9 @@ class _MIHAboutState extends State<MIHAbout> {
return MIHAction( return MIHAction(
icon: Icons.arrow_back, icon: Icons.arrow_back,
iconSize: 50, iconSize: 50,
onTap: () {}, onTap: () {
Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false);
},
); );
} }

View File

@@ -21,8 +21,8 @@ class RouteGenerator {
static Route<dynamic> generateRoute(RouteSettings settings) { static Route<dynamic> generateRoute(RouteSettings settings) {
final args = settings.arguments; final args = settings.arguments;
var extPath = Uri.base.path; var extPath = Uri.base.path;
// print(extPath); print(extPath);
// print(settings.name); print(settings.name);
// External Links Navigation // External Links Navigation
switch (extPath) { switch (extPath) {
case '/auth/reset-password': case '/auth/reset-password':
@@ -31,10 +31,6 @@ class RouteGenerator {
builder: (_) => ResetPassword( builder: (_) => ResetPassword(
token: Uri.base.queryParameters['token'], token: Uri.base.queryParameters['token'],
)); ));
case '/about':
return MaterialPageRoute(
settings: settings,
builder: (_) => const MIHAbout());
default: default:
// Internal Navigation // Internal Navigation
switch (settings.name) { switch (settings.name) {
@@ -51,8 +47,7 @@ class RouteGenerator {
//About MIH //About MIH
case '/about': case '/about':
return MaterialPageRoute( return MaterialPageRoute(
settings: settings, settings: settings, builder: (_) => const MIHAbout());
builder: (_) => const MIHAbout());
//=============================================================== //===============================================================
//User Profile //User Profile