cancel static method
A neutral action (e.g. "Cancel"). Pops with result.
Implementation
static Widget cancel(
BuildContext context, {
Object? result,
String label = 'Cancel',
}) => TextButton(
onPressed: () => Navigator.pop(context, result),
child: Text(label),
);