createSnackBar method
dynamic
createSnackBar(
- BuildContext context, {
- required String message,
- required Color backgroundColor,
Implementation
createSnackBar(BuildContext context,
{required String message, required Color backgroundColor}) {
return ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(message),
backgroundColor: backgroundColor,
duration: Duration(seconds: 5),
),
);
}