On Back Pressed
Easiest package which overrides the back button functions in your flutter app
https://www.buymeacoffee.com/heyom
> Adding Permissions
No Permissions Required
Extreme Simple use of the package
Use the widget as the parent widget of Scaffold of your widget tree
OnBackPressed(),
Requires a child widget
Requires a function
perform(){}
Full Widget Example
OnBackPressed(
perform(){
//perform any action on back pressed
},
child:Scaffold(),
),
Look at the example linked to know more
https://pub.dev/packages/back_pressed/example
Getting Started with Flutter
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.