onClosePressed property

VoidCallback? onClosePressed
final

Callback invoked when the close button is pressed.

If not provided, it calls Navigator.pop by default. This allows the dialog to be closed completely, even if the dialog could have multiple pages for example.

Implementation

final VoidCallback? onClosePressed;