AppDialog constructor

AppDialog({
  1. required BuildContext context,
  2. DialogType dialogType = DialogType.INFO,
  3. Widget? customHeader,
  4. String? title,
  5. String? desc,
  6. Widget? body,
  7. Widget? btnOk,
  8. Widget? btnCancel,
  9. String? btnOkText,
  10. IconData? btnOkIcon,
  11. Function? btnOkOnPress,
  12. Color? btnOkColor,
  13. String? btnCancelText,
  14. IconData? btnCancelIcon,
  15. Function? btnCancelOnPress,
  16. Color? btnCancelColor,
  17. Function? onDismissCallback,
  18. bool isDense = false,
  19. bool dismissOnTouchOutside = true,
  20. bool headerAnimationLoop = true,
  21. AlignmentGeometry alignment = Alignment.center,
  22. AnimType animType = AnimType.SCALE,
  23. Duration? animDuration,
  24. EdgeInsetsGeometry? padding,
  25. bool useRootNavigator = false,
  26. Duration? autoHide,
  27. bool keyboardAware = true,
  28. bool dismissOnBackKeyPress = true,
  29. double? width,
  30. BorderRadiusGeometry? buttonsBorderRadius,
  31. bool showCloseIcon = false,
  32. Widget? closeIcon,
  33. Color? dialogBackgroundColor,
  34. BorderRadius? backgroundBorderRadius,
  35. BorderSide? borderSide,
  36. TextStyle? buttonsTextStyle,
  37. 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,
      );