ElegantAlertDialog.caution constructor

ElegantAlertDialog.caution({
  1. Key? key,
  2. required ElegantBodyWidget alertContent,
  3. required String? confirmButtonText,
  4. required String? cancelButtonText,
  5. dynamic onConfirmButtonPressed()?,
  6. dynamic onCancelPressed()?,
  7. Color? confirmButtonColor = Colors.blue,
  8. Color? cancelButtonColor = Colors.grey,
  9. AnimationTypes animationType = AnimationTypes.scaleAnimation,
  10. Curve animationCurve = Curves.ease,
  11. Duration animationDuration = const Duration(seconds: 1),
  12. Color backgroundColor = Colors.white,
  13. List<BoxShadow>? dialogShadow,
  14. bool barrierDismissable = true,
  15. double height = 150,
  16. double borderRadius = 10,
  17. double borderSize = 1,
  18. bool withAnimation = true,
})

Implementation

ElegantAlertDialog.caution({
  super.key,
  required this.alertContent,
  required this.confirmButtonText,
  required this.cancelButtonText,
  this.onConfirmButtonPressed,
  this.onCancelPressed,
  this.confirmButtonColor = Colors.blue,
  this.cancelButtonColor = Colors.grey,
  this.animationType = AnimationTypes.scaleAnimation,
  this.animationCurve = Curves.ease,
  this.animationDuration = const Duration(
    seconds: 1,
  ),
  this.backgroundColor = Colors.white,
  this.dialogShadow,
  this.barrierDismissable = true,
  this.height = 150,
  this.borderRadius = 10,
  this.borderSize = 1,
  this.withAnimation = true,
}) {
  elegantAlertType = ElegantAlertDeleteType(
    alertContent,
    borderRadius,
    cancelButtonColor: cancelButtonColor!,
    cancelButtonText: cancelButtonText!,
    onCancelPressed: onCancelPressed,
    deleteButtonColor: confirmButtonColor!,
    deleteButtonText: confirmButtonText!,
    onDeletePressed: onConfirmButtonPressed,
  );
}