onPressed property

VoidCallback? onPressed
final

The callback function to be executed when the close button is pressed. If no callback is provided, it will default to popping the current route.

Implementation

final VoidCallback? onPressed;