CancelOption constructor
CancelOption({
- Key? key,
- VoidCallback? onPressed,
Supply the optionally Callback when pressed. Assigns a boolean False to the result property.
Implementation
CancelOption({Key? key, VoidCallback? onPressed})
: super(
key: key,
text: 'Cancel',
onPressed: () {
if (onPressed != null) {
onPressed();
}
},
result: false,
);