showErrorSnackBar method

void showErrorSnackBar({
  1. required String message,
  2. Duration displayDuration = const Duration(seconds: 4),
  3. bool showCloseIcon = false,
})

showSnackBar shows a snackbar message.
backgroundColor is red by default.
foregroundColor is white by default.

Implementation

void showErrorSnackBar(
    {required String message,
    Duration displayDuration = const Duration(seconds: 4),
    bool showCloseIcon = false}) {
  showSnackBar(
      message: message,
      backgroundColor: Colors.red,
      displayDuration: displayDuration,
      showCloseIcon: showCloseIcon);
}