mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
AppDrawer: Go back to the main route without stacking
The routing would be confusing otherwise
This commit is contained in:
@ -67,8 +67,8 @@ class AppDrawer extends StatelessWidget {
|
|||||||
if (m.settings.name == "/") {
|
if (m.settings.name == "/") {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} else {
|
} else {
|
||||||
Navigator.pop(context);
|
Navigator.popUntil(
|
||||||
Navigator.pushReplacementNamed(context, '/');
|
context, (route) => route.settings.name == '/');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user