showTSnackBar function

void showTSnackBar(
  1. BuildContext context,
  2. String message, {
  3. Color? color,
  4. bool? showCloseIcon,
  5. SnackBarAction? action,
  6. DismissDirection? dismissDirection,
  7. Color? closeIconColor,
  8. Color? backgroundColor,
})

Implementation

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