showMySnackBar static method
Implementation
static showMySnackBar(BuildContext context,String text, {Color? color}){
ScaffoldMessenger.of(context)
.showSnackBar(
SnackBar(
content: Text(text, textAlign: TextAlign.center),
backgroundColor: color ?? Theme.of(context).errorColor,
behavior: SnackBarBehavior.floating,
),
);
}