ElegantAlertDialog.permission constructor
ElegantAlertDialog.permission({
- Key? key,
- required ElegantBodyWidget alertContent,
- required String? confirmButtonText,
- required String? cancelButtonText,
- dynamic onConfirmButtonPressed()?,
- dynamic onCancelPressed()?,
- Color? confirmButtonColor = Colors.blue,
- Color? cancelButtonColor = Colors.grey,
- AnimationTypes animationType = AnimationTypes.scaleAnimation,
- Curve animationCurve = Curves.ease,
- Duration animationDuration = const Duration(seconds: 1),
- Color backgroundColor = Colors.white,
- List<
BoxShadow> ? dialogShadow, - bool barrierDismissable = true,
- double height = 150,
- double borderRadius = 10,
- double borderSize = 1,
- bool withAnimation = true,
Implementation
ElegantAlertDialog.permission({
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 = ElegantAlertPermissionType(
alertContent,
borderRadius,
allowButtonText: confirmButtonText!,
denyButtonText: cancelButtonText!,
allowButtonColor: confirmButtonColor!,
denyButtonColor: cancelButtonColor!,
onAllowButtonPressed: onConfirmButtonPressed,
onDenyButtonPressed: onCancelPressed,
);
}