showTSnackBarError function
void
showTSnackBarError(
- BuildContext context,
- String message, {
- bool? showCloseIcon,
- SnackBarAction? action,
- DismissDirection? dismissDirection,
- Color? closeIconColor,
Implementation
void showTSnackBarError(
BuildContext context,
String message, {
bool? showCloseIcon,
SnackBarAction? action,
DismissDirection? dismissDirection,
Color? closeIconColor,
}) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(message, style: TextStyle(color: Colors.white)),
showCloseIcon: showCloseIcon,
action: action,
dismissDirection: dismissDirection,
closeIconColor: closeIconColor,
backgroundColor: Colors.red,
),
);
}