copyWith method
- @useResult
- FWidgetStateMap<
BoxDecoration> ? decoration, - FButtonContentStyle contentStyle()?,
- FButtonIconContentStyle iconContentStyle()?,
- FTappableStyle tappableStyle()?,
- FFocusedOutlineStyle focusedOutlineStyle()?,
Returns a copy of this FButtonStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
decoration
The box decoration.
Supported states:
contentStyle
The content's style.
iconContentStyle
The icon content's style.
tappableStyle
The tappable's style.
focusedOutlineStyle
The focused outline style.
Implementation
@useResult
FButtonStyle copyWith({
FWidgetStateMap<BoxDecoration>? decoration,
FButtonContentStyle Function(FButtonContentStyle)? contentStyle,
FButtonIconContentStyle Function(FButtonIconContentStyle)? iconContentStyle,
FTappableStyle Function(FTappableStyle)? tappableStyle,
FFocusedOutlineStyle Function(FFocusedOutlineStyle)? 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,
);