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 == "/") {
Navigator.pop(context);
} else {
Navigator.pop(context);
Navigator.pushReplacementNamed(context, '/');
Navigator.popUntil(
context, (route) => route.settings.name == '/');
}
},
),