onPopInvokedWithResult property

PopInvokedWithResultCallback<Object?>? onPopInvokedWithResult
final

Called after a route pop was handled.

Even when the pop is canceled, for example by a PopScope widget, this will still be called. The didPop parameter indicates whether or not the back navigation actually happened successfully.

This sample demonstrates how to use this parameter to show a confirmation dialog when a navigation pop would cause form data to be lost.
link

To create a local project with this code sample, run:
flutter create --sample=widgets.Form.onPopInvokedWithResult.1 mysample

See also:

Implementation

final PopInvokedWithResultCallback<Object?>? onPopInvokedWithResult;