copyWith method

SmartDialogParams copyWith({
  1. Color? backgroundColor,
  2. Color? foregroundColor,
  3. Color? borderColor,
  4. String? title,
  5. TextStyle? titleTextStyle,
  6. Color? closeIconColor,
  7. TextStyle? descriptionTextStyle,
  8. TextStyle? positiveButtonTextStyle,
  9. ButtonStyle? positiveButtonStyle,
  10. TextStyle? negativeButtonTextStyle,
  11. ButtonStyle? negativeButtonStyle,
  12. String? description,
  13. Widget? customWidget,
  14. String? positiveButtonText,
  15. String? negativeButtonText,
  16. VoidCallback? onPositiveButtonPressed,
  17. VoidCallback? onNegativeButtonPressed,
  18. VoidCallback? onOutClick,
  19. 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,
  );
}