cancelButton method Null safety
- BuildContext context
A dialogue cancel button which simply closes the popup.
Implementation
static Widget cancelButton(BuildContext context) {
return TextButton(
onPressed: () => Navigator.pop(context),
child: const Text('Cancel'),
style: ButtonStyle(
foregroundColor: MaterialStateProperty.all(Colors.black),
),
);
}