NiceDialog constructor
NiceDialog({
- NiceDialogType? type,
- Color? typeInfoColor,
- Color? typeWarningColor,
- Color? typeErrorColor,
- Color? typeMultipleOptionsColor,
- Color? backgroundColor,
- double? elevation,
- ShapeBorder? shape,
- Widget? header,
- Color? headerColor,
- Widget? headerIcon,
- IconData? headerIconData,
- double? headerIconSize,
- Color? headerIconColor,
- double? headerPadding,
- double? borderRadius,
- Widget? title,
- String? titleText,
- Color? titleColor,
- Widget? content,
- String? message,
- Color? messageColor,
- Widget? btnOk,
- String? btnOkText,
- Color? btnOkColor,
- VoidCallback? btnOkAction,
- Widget? btnCancel,
- String? btnCancelText,
- Color? btnCancelColor,
- VoidCallback? btnCancelAction,
- Widget? btnNeutral,
- String? btnNeutralText,
- Color? btnNeutralColor,
- VoidCallback? btnNeutralAction,
- double? textScaleFactor,
Implementation
NiceDialog({
NiceDialogType? type,
Color? typeInfoColor,
Color? typeWarningColor,
Color? typeErrorColor,
Color? typeMultipleOptionsColor,
this.backgroundColor,
this.elevation,
ShapeBorder? shape,
this.header,
this.headerColor,
this.headerIcon,
this.headerIconData,
double? headerIconSize,
Color? headerIconColor,
double? headerPadding,
double? borderRadius,
this.title,
this.titleText,
this.titleColor,
this.content,
this.message,
this.messageColor,
this.btnOk,
this.btnOkText,
this.btnOkColor,
this.btnOkAction,
this.btnCancel,
this.btnCancelText,
this.btnCancelColor,
this.btnCancelAction,
this.btnNeutral,
this.btnNeutralText,
this.btnNeutralColor,
this.btnNeutralAction,
this.textScaleFactor,
}) : type = type ?? NiceDialogType.NONE,
typeInfoColor = typeInfoColor ?? Colors.blue,
typeWarningColor = typeWarningColor ?? Colors.orange,
typeErrorColor = typeErrorColor ?? const Color(0xFFC62828),
typeMultipleOptionsColor = typeMultipleOptionsColor ?? Colors.green,
headerIconSize = headerIconSize ?? 48,
headerIconColor = headerIconColor ?? Colors.white,
headerPadding = headerPadding ?? 8,
borderRadius = borderRadius ?? 16,
shape = shape ??
RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(borderRadius ?? 16))) {
headerIconData ??= (getDialogTypeIconData() ?? Icons.info);
headerColor ??= (getDialogTypeColor() ?? Colors.blue);
headerIcon ??= Icon(
headerIconData,
color: this.headerIconColor,
size: this.headerIconSize,
);
}