showDefaultSnackBar function
Implementation
void showDefaultSnackBar({
required String message,
required BuildContext context,
}) {
final snackBar = SnackBar(
duration: const Duration(seconds: 2),
behavior: SnackBarBehavior.floating,
content: Container(
margin: const EdgeInsets.all(5),
child: Text(
message,
style: const TextStyle(color: Colors.white),
),
),
backgroundColor: Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}