error static method

ScaffoldFeatureController<SnackBar, SnackBarClosedReason> error(
  1. BuildContext context,
  2. String message, {
  3. String? title,
  4. String? actionText,
  5. VoidCallback? onTap,
  6. Duration? duration,
})

Shows an error/danger snackbar.

Implementation

static ScaffoldFeatureController<SnackBar, SnackBarClosedReason> error(
  BuildContext context,
  String message, {
  String? title,
  String? actionText,
  VoidCallback? onTap,
  Duration? duration,
}) {
  return show(
    context,
    message,
    title: title,
    icon: Icons.error_outline_rounded,
    color: context.theme.danger,
    actionText: actionText,
    onTap: onTap,
    duration: duration,
  );
}