onPop property
void Function(T poppedValue, T valueAfterPop)
onPop
final
A callback that runs immediately after a page is popped.
The popped value is passed in as poppedValue
. The new page value after
popping is passed in as valueAfterPop
.
Unless using ImplicitNavigator.fromValueNotifier which manages state for
you, this function should be used to revert external state to
valueAfterPop
:
value: myValue,
onPop: (poppedValue, valueAfterPop) => myValue = valueAfterPop,
Implementation
final void Function(T poppedValue, T valueAfterPop) onPop;