NDialog constructor

const NDialog({
  1. Key? key,
  2. String? title,
  3. String? message,
  4. AlignmentDirectional titleAlign = AlignmentDirectional.center,
  5. TextAlign messageAlign = TextAlign.center,
  6. bool showConfirmButton = true,
  7. bool showCancelButton = false,
  8. String confirmButtonText = "确认",
  9. Color confirmButtonColor = Style.dialogBackgroundColor,
  10. Color confirmTextColor = Style.dialogConfirmButtonTextColor,
  11. String cancelButtonText = "取消",
  12. Color cancelButtonColor = Style.dialogBackgroundColor,
  13. Color cancelTextColor = Style.dialogCancelButtonTextColor,
  14. bool closeOnClickOverlay = false,
  15. dynamic onConfirm()?,
  16. dynamic onCancel()?,
  17. Future<bool> beforeClose()?,
  18. Widget? child,
})

Implementation

const NDialog(
    {Key? key,
    this.title,
    this.message,
    this.titleAlign: AlignmentDirectional.center,
    this.messageAlign: TextAlign.center,
    this.showConfirmButton: true,
    this.showCancelButton: false,
    this.confirmButtonText: "确认",
    this.confirmButtonColor: Style.dialogBackgroundColor,
    this.confirmTextColor: Style.dialogConfirmButtonTextColor,
    this.cancelButtonText: "取消",
    this.cancelButtonColor: Style.dialogBackgroundColor,
    this.cancelTextColor: Style.dialogCancelButtonTextColor,
    this.closeOnClickOverlay: false,
    this.onConfirm,
    this.onCancel,
    this.beforeClose,
    this.child})
    : super(key: key);