snackbarRed static method

void snackbarRed({
  1. required String title,
  2. required String subtitle,
  3. SnackPosition? snackPosition,
  4. Widget? titleText,
  5. Widget? messageText,
  6. Widget? icon,
  7. bool? shouldIconPulse,
  8. double? maxWidth,
  9. EdgeInsets? margin,
  10. EdgeInsets? padding,
  11. double? borderRadius,
  12. Color? borderColor,
  13. double? borderWidth,
  14. Color? backgroundColor,
  15. Color? leftBarIndicatorColor,
  16. List<BoxShadow>? boxShadows,
  17. Gradient? backgroundGradient,
  18. TextButton? mainButton,
  19. OnTap? onTap,
  20. bool? isDismissible,
  21. bool? showProgressIndicator,
  22. DismissDirection? dismissDirection,
  23. AnimationController? progressIndicatorController,
  24. Color? progressIndicatorBackgroundColor,
  25. Animation<Color>? progressIndicatorValueColor,
  26. SnackStyle? snackStyle,
  27. Curve? forwardAnimationCurve,
  28. Curve? reverseAnimationCurve,
  29. Duration? animationDuration,
  30. double? barBlur,
  31. double? overlayBlur,
  32. SnackbarStatusCallback? snackbarStatus,
  33. Color? overlayColor,
  34. Form? userInputForm,
  35. Color? colorText,
  36. int duration = 5,
  37. bool instantInit = true,
})

Implementation

static void snackbarRed({
  required final String title,
  required final String subtitle,
  final SnackPosition? snackPosition,
  final Widget? titleText,
  final Widget? messageText,
  final Widget? icon,
  final bool? shouldIconPulse,
  final double? maxWidth,
  final EdgeInsets? margin,
  final EdgeInsets? padding,
  final double? borderRadius,
  final Color? borderColor,
  final double? borderWidth,
  final Color? backgroundColor,
  final Color? leftBarIndicatorColor,
  final List<BoxShadow>? boxShadows,
  final Gradient? backgroundGradient,
  final TextButton? mainButton,
  final OnTap? onTap,
  final bool? isDismissible,
  final bool? showProgressIndicator,
  final DismissDirection? dismissDirection,
  final AnimationController? progressIndicatorController,
  final Color? progressIndicatorBackgroundColor,
  final Animation<Color>? progressIndicatorValueColor,
  final SnackStyle? snackStyle,
  final Curve? forwardAnimationCurve,
  final Curve? reverseAnimationCurve,
  final Duration? animationDuration,
  final double? barBlur,
  final double? overlayBlur,
  final SnackbarStatusCallback? snackbarStatus,
  final Color? overlayColor,
  final Form? userInputForm,
  final Color? colorText,
  final int duration = 5,
  final bool instantInit = true,
}) {
  if (!Get.isSnackbarOpen)
    Get.snackbar(
      title,
      subtitle,
      backgroundColor: backgroundColor ?? Colors.red,
      colorText: colorText ?? Colors.white,
      maxWidth: maxWidth,
      onTap: onTap,
      margin: margin,
      borderRadius: borderRadius,
      snackPosition: snackPosition,
      padding: padding,
      animationDuration: animationDuration,
      backgroundGradient: backgroundGradient,
      barBlur: barBlur,
      borderColor: borderColor,
      borderWidth: borderWidth,
      boxShadows: boxShadows,
      dismissDirection: dismissDirection,
      duration: Duration(seconds: duration),
      forwardAnimationCurve: forwardAnimationCurve,
      icon: icon,
      instantInit: instantInit,
      isDismissible: isDismissible,
      leftBarIndicatorColor: leftBarIndicatorColor,
      mainButton: mainButton,
      messageText: messageText,
      overlayBlur: overlayBlur,
      overlayColor: overlayColor,
      progressIndicatorBackgroundColor: progressIndicatorBackgroundColor,
      progressIndicatorController: progressIndicatorController,
      progressIndicatorValueColor: progressIndicatorValueColor,
      reverseAnimationCurve: reverseAnimationCurve,
      shouldIconPulse: shouldIconPulse,
      showProgressIndicator: showProgressIndicator,
      snackbarStatus: snackbarStatus,
      snackStyle: snackStyle,
      titleText: titleText,
      userInputForm: userInputForm,
    );
}