onUnsavedFormPop property
Called when current route tries to pop with unsaved changes.
Return true
to allow pop, false
or null
to prevent pop.
Usually used to show a dialog to confirm pop.
If null, always allow pop (behavior disabled, acts like a normal form).
Implementation
final Future<bool?> Function()? onUnsavedFormPop;