copyWith method
SmartDialogParams
copyWith({
- Color? backgroundColor,
- Color? foregroundColor,
- Color? borderColor,
- String? title,
- TextStyle? titleTextStyle,
- Color? closeIconColor,
- TextStyle? descriptionTextStyle,
- TextStyle? positiveButtonTextStyle,
- ButtonStyle? positiveButtonStyle,
- TextStyle? negativeButtonTextStyle,
- ButtonStyle? negativeButtonStyle,
- String? description,
- Widget? customWidget,
- String? positiveButtonText,
- String? negativeButtonText,
- VoidCallback? onPositiveButtonPressed,
- VoidCallback? onNegativeButtonPressed,
- VoidCallback? onOutClick,
- VoidCallback? onOnClose,
Copies this instance with updated values.
Returns a new SmartDialogParams with the updated fields.
Implementation
SmartDialogParams copyWith({
Color? backgroundColor,
Color? foregroundColor,
Color? borderColor,
String? title,
TextStyle? titleTextStyle,
Color? closeIconColor,
TextStyle? descriptionTextStyle,
TextStyle? positiveButtonTextStyle,
ButtonStyle? positiveButtonStyle,
TextStyle? negativeButtonTextStyle,
ButtonStyle? negativeButtonStyle,
String? description,
Widget? customWidget,
String? positiveButtonText,
String? negativeButtonText,
VoidCallback? onPositiveButtonPressed,
VoidCallback? onNegativeButtonPressed,
VoidCallback? onOutClick,
VoidCallback? onOnClose,
}) {
return SmartDialogParams(
backgroundColor: backgroundColor ?? this.backgroundColor,
foregroundColor: foregroundColor ?? this.foregroundColor,
borderColor: borderColor ?? this.borderColor,
title: title ?? this.title,
titleTextStyle: titleTextStyle ?? this.titleTextStyle,
closeIconColor: closeIconColor ?? this.closeIconColor,
descriptionTextStyle: descriptionTextStyle ?? this.descriptionTextStyle,
positiveButtonTextStyle: positiveButtonTextStyle ?? this.positiveButtonTextStyle,
positiveButtonStyle: positiveButtonStyle ?? this.positiveButtonStyle,
negativeButtonTextStyle: negativeButtonTextStyle ?? this.negativeButtonTextStyle,
negativeButtonStyle: negativeButtonStyle ?? this.negativeButtonStyle,
description: description ?? this.description,
customWidget: customWidget ?? this.customWidget,
positiveButtonText: positiveButtonText ?? this.positiveButtonText,
negativeButtonText: negativeButtonText ?? this.negativeButtonText,
onPositiveButtonPressed: onPositiveButtonPressed ?? this.onPositiveButtonPressed,
onNegativeButtonPressed: onNegativeButtonPressed ?? this.onNegativeButtonPressed,
onOutClick: onOutClick ?? this.onOutClick,
onOnClose: onOnClose ?? this.onOnClose,
);
}