onWillPop property

  1. @override
Future<bool> Function(BuildContext?)? onWillPop
final

If you want to perform a custom action on Android when exiting the app, you can write your logic here. Returns context of the selected screen. If you to exit the app make sure to set handleAndroidBackButtonPress as false.

Implementation

@override
final Future<bool> Function(BuildContext?)? onWillPop;