ElegantAlertDialog.multiActions constructor

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

Implementation

ElegantAlertDialog.multiActions({
  super.key,
  required this.alertContent,
  required this.confirmButtonText,
  required this.secondButtonText,
  required this.cancelButtonText,
  this.confirmButtonColor = Colors.blue,
  this.secondButtonColor = Colors.grey,
  this.cancelButtonColor = Colors.green,
  this.onConfirmButtonPressed,
  this.onSecondaryButtonPressed,
  this.onCancelPressed,
  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 = ElegantAlertMultiActionsType(
    alertContent,
    borderRadius,
    primaryActionText: confirmButtonText!,
    secondaryActionText: secondButtonText!,
    customActionText: cancelButtonText!,
    primaryButtonColor: confirmButtonColor!,
    secondaryButtonColor: secondButtonColor!,
    customButtonColor: cancelButtonColor!,
    onPrimaryButtonPressed: onConfirmButtonPressed,
    onSecondaryButtonPressed: onSecondaryButtonPressed,
    onCustomButtonPressed: onCancelPressed,
  );
}