error static method

void error(
  1. BuildContext context,
  2. String message, {
  3. Duration? duration,
  4. SnackBarAction? action,
  5. bool? showCloseButton,
  6. bool? showProgressIndicator,
  7. SnackbarPosition? position,
})

Shows an error snackbar with an error icon.

Implementation

static void error(
  BuildContext context,
  String message, {
  Duration? duration,
  SnackBarAction? action,
  bool? showCloseButton,
  bool? showProgressIndicator,
  SnackbarPosition? position,
}) {
  show(
    context,
    message: message,
    backgroundColor: SnackbarColors.errorBackground,
    textColor: SnackbarColors.errorText,
    icon: Icons.error,
    duration: duration,
    action: action,
    showCloseButton: showCloseButton,
    showProgressIndicator: showProgressIndicator,
    position: position,
  );
}