copyWith method

  1. @useResult
FButtonStyle copyWith({
  1. FWidgetStateMap<BoxDecoration>? decoration,
  2. FButtonContentStyle contentStyle(
    1. FButtonContentStyle style
    )?,
  3. FButtonIconContentStyle iconContentStyle(
    1. FButtonIconContentStyle style
    )?,
  4. FTappableStyle tappableStyle(
    1. FTappableStyle style
    )?,
  5. FFocusedOutlineStyle focusedOutlineStyle(
    1. FFocusedOutlineStyle style
    )?,
})

Returns a copy of this FButtonStyle with the given properties replaced.

Consider using the CLI to generate a style.

Parameters

Implementation

@useResult
FButtonStyle copyWith({
  FWidgetStateMap<BoxDecoration>? decoration,
  FButtonContentStyle Function(FButtonContentStyle style)? contentStyle,
  FButtonIconContentStyle Function(FButtonIconContentStyle style)? iconContentStyle,
  FTappableStyle Function(FTappableStyle style)? tappableStyle,
  FFocusedOutlineStyle Function(FFocusedOutlineStyle style)? focusedOutlineStyle,
}) => FButtonStyle(
  decoration: decoration ?? this.decoration,
  contentStyle: contentStyle != null ? contentStyle(this.contentStyle) : this.contentStyle,
  iconContentStyle: iconContentStyle != null ? iconContentStyle(this.iconContentStyle) : this.iconContentStyle,
  tappableStyle: tappableStyle != null ? tappableStyle(this.tappableStyle) : this.tappableStyle,
  focusedOutlineStyle: focusedOutlineStyle != null
      ? focusedOutlineStyle(this.focusedOutlineStyle)
      : this.focusedOutlineStyle,
);