showSnackBar function
Implementation
void showSnackBar(BuildContext context, SnackType? type, String? message) {
Color backgroundColor= _getColors(type);
Color textColor = Colors.white;
if(message != null && message != ''){
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
behavior: SnackBarBehavior.floating,
backgroundColor: backgroundColor,
content: Text(message, style: TextStyle(fontSize: 18, color: textColor ) ),
elevation: 8,
showCloseIcon: true,
closeIconColor: textColor,
)
);
}
}