copyWith method

DialogTheme copyWith(
  1. {Color? backgroundColor,
  2. double? elevation,
  3. Color? shadowColor,
  4. Color? surfaceTintColor,
  5. ShapeBorder? shape,
  6. AlignmentGeometry? alignment,
  7. Color? iconColor,
  8. TextStyle? titleTextStyle,
  9. TextStyle? contentTextStyle,
  10. EdgeInsetsGeometry? actionsPadding}
)

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

DialogTheme copyWith({
  Color? backgroundColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  ShapeBorder? shape,
  AlignmentGeometry? alignment,
  Color? iconColor,
  TextStyle? titleTextStyle,
  TextStyle? contentTextStyle,
  EdgeInsetsGeometry? actionsPadding,
}) {
  return DialogTheme(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    elevation: elevation ?? this.elevation,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    shape: shape ?? this.shape,
    alignment: alignment ?? this.alignment,
    iconColor: iconColor ?? this.iconColor,
    titleTextStyle: titleTextStyle ?? this.titleTextStyle,
    contentTextStyle: contentTextStyle ?? this.contentTextStyle,
    actionsPadding: actionsPadding ?? this.actionsPadding,
  );
}