AppDialog constructor
AppDialog({
- required BuildContext context,
- DialogType dialogType = DialogType.INFO,
- Widget? customHeader,
- String? title,
- String? desc,
- Widget? body,
- Widget? btnOk,
- Widget? btnCancel,
- String? btnOkText,
- IconData? btnOkIcon,
- Function? btnOkOnPress,
- Color? btnOkColor,
- String? btnCancelText,
- IconData? btnCancelIcon,
- Function? btnCancelOnPress,
- Color? btnCancelColor,
- Function? onDismissCallback,
- bool isDense = false,
- bool dismissOnTouchOutside = true,
- bool headerAnimationLoop = true,
- AlignmentGeometry alignment = Alignment.center,
- AnimType animType = AnimType.SCALE,
- Duration? animDuration,
- EdgeInsetsGeometry? padding,
- Duration? autoHide,
- bool keyboardAware = true,
- bool dismissOnBackKeyPress = true,
- double? width,
- BorderRadiusGeometry? buttonsBorderRadius,
- bool showCloseIcon = false,
- Widget? closeIcon,
- Color? dialogBackgroundColor,
- BorderRadius? backgroundBorderRadius,
- BorderSide? borderSide,
- TextStyle? buttonsTextStyle,
- bool noVerticalMargin = false,
Implementation
AppDialog(
{required this.context,
this.dialogType = DialogType.INFO,
this.customHeader,
this.title,
this.desc,
this.body,
this.btnOk,
this.btnCancel,
this.btnOkText,
this.btnOkIcon,
this.btnOkOnPress,
this.btnOkColor,
this.btnCancelText,
this.btnCancelIcon,
this.btnCancelOnPress,
this.btnCancelColor,
this.onDismissCallback,
this.isDense = false,
this.dismissOnTouchOutside = true,
this.headerAnimationLoop = true,
this.alignment = Alignment.center,
this.animType = AnimType.SCALE,
this.animDuration,
this.padding,
this.useRootNavigator = false,
this.autoHide,
this.keyboardAware = true,
this.dismissOnBackKeyPress = true,
this.width,
this.buttonsBorderRadius,
this.showCloseIcon = false,
this.closeIcon,
this.dialogBackgroundColor,
this.backgroundBorderRadius,
this.borderSide,
this.buttonsTextStyle,
this.noVerticalMargin = false})
: assert(
context != null,
);