onWillPop property

  1. @Deprecated('Use canPop and/or onPopInvoked instead. ' 'This feature was deprecated after v3.12.0-1.0.pre.')
WillPopCallback? onWillPop
final

Enables the form to veto attempts by the user to dismiss the ModalRoute that contains the form.

If the callback returns a Future that resolves to false, the form's route will not be popped.

See also:

  • WillPopScope, another widget that provides a way to intercept the back button.

Implementation

@Deprecated(
  'Use canPop and/or onPopInvoked instead. '
  'This feature was deprecated after v3.12.0-1.0.pre.',
)
final WillPopCallback? onWillPop;