NDialog constructor
const
NDialog({
- Key? key,
- String? title,
- String? message,
- AlignmentDirectional titleAlign = AlignmentDirectional.center,
- TextAlign messageAlign = TextAlign.center,
- bool showConfirmButton = true,
- bool showCancelButton = false,
- String confirmButtonText = "确认",
- Color confirmButtonColor = Style.dialogBackgroundColor,
- Color confirmTextColor = Style.dialogConfirmButtonTextColor,
- String cancelButtonText = "取消",
- Color cancelButtonColor = Style.dialogBackgroundColor,
- Color cancelTextColor = Style.dialogCancelButtonTextColor,
- bool closeOnClickOverlay = false,
- dynamic onConfirm()?,
- dynamic onCancel()?,
- Future<
bool> beforeClose()?, - 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);