copyWith method

  1. @override
SheetThemeData copyWith({
  1. Curve? curve,
  2. Duration? duration,
  3. SheetStyle? style,
  4. SheetStyleByVariant? variantStyle,
  5. SheetStyleByVariant? dangerStyle,
  6. SheetStyleByVariant? warningStyle,
  7. SheetStyleByVariant? successStyle,
  8. SheetStyleByVariant? infoStyle,
})
override

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

Implementation

@override
SheetThemeData copyWith({
  Curve? curve,
  Duration? duration,
  SheetStyle? style,
  SheetStyleByVariant? variantStyle,
  SheetStyleByVariant? dangerStyle,
  SheetStyleByVariant? warningStyle,
  SheetStyleByVariant? successStyle,
  SheetStyleByVariant? infoStyle,
}) {
  return SheetThemeData(
    curve: curve ?? this.curve,
    duration: duration ?? this.duration,
    style: this.style.merge(style),
    variantStyle: this.variantStyle.merge(variantStyle),
    dangerStyle: this.dangerStyle.merge(dangerStyle),
    warningStyle: this.warningStyle.merge(warningStyle),
    successStyle: this.successStyle.merge(successStyle),
    infoStyle: this.infoStyle.merge(infoStyle),
  );
}