This will help you modify the appBar widget to create a back button in your app in every page, below will give you solid description about the dart code.

automaticallyImplyLeading
➤ If true` if you want Flutter to automatically add Back Button when needed, if false you will force your own back button every where

leading: IconButton (icon:Icon(Icons.arrow_back),
➤ Add Back arrow icon for android
leading: IconButton(icon: Icon(Icons.arrow_back_ios),
➤ Add Back arrow icon for iOS

onPressed:() Navigator.pop(context, false),
➤ This will help you pop your top stack view
onPressed:() exit(0),
➤ This will help you to exit into you app

➤ Source Code: https://github.com/benedictcontawe/FlutterApp

#flutter #dart

How to Add Back Button at App Bar with Flutter & Dart
1.18K GEEK