Just a simple method. Wrap Scaffold with WillPopScope widget . Show activity on this post. In this case when user will tap system back button, onWillPop callback will decide should the screen be popped or not.
Read moreHow do I create a Back button in flutter?
The solution is quite simple. What you need to do is to set the leading argument of the AppBar widget to your custom widget (eg: an elevated button): appBar: AppBar( // Overide the default Back button automaticallyImplyLeading: false, leadingWidth: 100, leading: ElevatedButton. icon( onPressed: () => Navigator.28 Ara 2021
Read more