toast method
dynamic
toast(})
Implementation
toast(context,
{String? title,
String? buttonLabel,
Function()? onPressed,
Color? buttonTheme,
Color? theme}) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(title ?? ''),
backgroundColor: theme ?? Colors.green,
action: SnackBarAction(
label: buttonLabel ?? '',
textColor: buttonTheme ?? Colors.black,
onPressed: onPressed ?? () {},
),
),
);
}