onCancel property

VoidCallback? onCancel
final

Optional callback function executed when the cancel button is pressed.

The dialog will automatically close after this callback is executed (if provided).

Implementation

final VoidCallback? onCancel;