AppDrawer: Go back to the main route without stacking

The routing would be confusing otherwise
This commit is contained in:
Vishesh Handa
2019-12-05 17:22:31 +01:00
parent 4682896592
commit 07ad503348

View File

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