onBackPressed property

VoidCallback? onBackPressed
final

The action to perform when the back button is pressed.

By default it calls Navigator.pop

Implementation

final VoidCallback? onBackPressed;