onDismiss property

VoidCallback? onDismiss

Called when the barrier is being dismissed.

If non-null onDismiss will be called in place of popping the current route. It is up to the callback to handle dismissing the barrier.

If null, the ambient Navigator's current route will be popped.

This field is ignored if dismissible is false.


final VoidCallback? onDismiss;