MotionToast.warning constructor

MotionToast.warning({
  1. Key? key,
  2. required Widget description,
  3. Widget? title,
  4. IconType? iconType = IconType.materialDesign,
  5. double? width = 350,
  6. double? height = 80,
  7. BoxConstraints? constraints,
  8. double iconSize = 40,
  9. bool enableAnimation = true,
  10. ToastOrientation layoutOrientation = ToastOrientation.ltr,
  11. AnimationType animationType = AnimationType.fromBottom,
  12. Duration animationDuration = const Duration(milliseconds: 1500),
  13. Duration toastDuration = const Duration(seconds: 3),
  14. Curve animationCurve = Curves.ease,
  15. MotionToastPosition position = MotionToastPosition.bottom,
  16. double borderRadius = 20,
  17. Function? onClose,
  18. bool dismissable = true,
  19. Color barrierColor = Colors.transparent,
  20. EdgeInsets margin = EdgeInsets.zero,
  21. bool displayBorder = false,
  22. bool displaySideBar = true,
  23. EdgeInsets contentPadding = EdgeInsets.zero,
})

Render a warning motion toast primaryColor is set to warningColor icon is set to MOTION_TOAST_ICONS_MD[MOTION_TOAST_TYPE.WARNING] or MOTION_TOAST_ICONS_CUPERTINO[MOTION_TOAST_TYPE.WARNING] description is required

the text style by default: TextStyle(color: Colors.black)

Implementation

MotionToast.warning({
  Key? key,
  required this.description,
  this.title,
  this.iconType = IconType.materialDesign,
  this.width = 350,
  this.height = 80,
  this.constraints,
  this.iconSize = 40,
  this.enableAnimation = true,
  this.layoutOrientation = ToastOrientation.ltr,
  this.animationType = AnimationType.fromBottom,
  this.animationDuration = const Duration(
    milliseconds: 1500,
  ),
  this.toastDuration = const Duration(
    seconds: 3,
  ),
  this.animationCurve = Curves.ease,
  this.position = MotionToastPosition.bottom,
  this.borderRadius = 20,
  this.onClose,
  this.dismissable = true,
  this.barrierColor = Colors.transparent,
  this.margin = EdgeInsets.zero,
  this.displayBorder = false,
  this.displaySideBar = true,
  this.contentPadding = EdgeInsets.zero,
}) : super(key: key) {
  motionToastType = MotionToastType.warning;
  _initializeAnimationType();
  _assertValidValues();
  _initializeParameters();
}