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, will not prevent pop (behavior disabled, acts like a normal Form).
Implementation
final Future<bool?> Function()? onUnsavedFormPop;