If you do not use named routes, you can use
Navigator.of(context).popUntil((route) => route.isFirst);
More Related Contents:
- How to deal with unwanted widget build?
- How to display response from the server in Flutter app screen?
- The argument type ‘String’ can’t be assigned to the parameter type ‘Uri’
- Check whether there is an Internet connection available on Flutter app
- Adding a splash screen to Flutter apps
- Flutter – Wrap text on overflow, like insert ellipsis or fade
- How to refresh an AlertDialog in Flutter?
- Dart set default value for parameter
- How to change package name in flutter?
- Scaffold.of() called with a context that does not contain a Scaffold
- How to add a ListView to a Column in Flutter?
- How do I Set Background image in Flutter?
- How to add image in Flutter
- How to know if a widget is visible within a viewport?
- InkWell not showing ripple effect
- How to debounce Textfield onChange in Dart?
- Flutter: How to hide or show more text within certain length
- How can I dismiss the on screen keyboard?
- Flutter: Expanded vs Flexible
- How do I use Dart extension functions?
- Overflowing text does not wrap
- How to check if scroll position is at top or bottom in ListView?
- Incorrect use of parent data widget. expanded widgets must be placed inside flex widgets
- Visual Studio not installed; this is necessary for Windows development
- Flutter use variable created inside Future builder outside of the build method,
- How do you change the value inside of a textfield flutter?
- How to use BottomNavigationBar with Navigator?
- Preserving state between tab view pages
- How to build APK with no sound null safety
- How can I detect if my Flutter app is running in the web?