copyWith method
- @useResult
- FWidgetStateMap<
BoxDecoration> ? decoration, - FButtonContentStyle contentStyle(
- FButtonContentStyle style
- FButtonIconContentStyle iconContentStyle(
- FButtonIconContentStyle style
- FTappableStyle tappableStyle(
- FTappableStyle style
- FFocusedOutlineStyle focusedOutlineStyle(
- FFocusedOutlineStyle style
Returns a copy of this FButtonStyle with the given properties replaced.
Consider using the CLI to generate a style.
Parameters
- FButtonStyle.decoration - The box decoration.
- FButtonStyle.contentStyle - The content's style.
- FButtonStyle.iconContentStyle - The icon content's style.
- FButtonStyle.tappableStyle - The tappable's style.
- FButtonStyle.focusedOutlineStyle - The focused outline style.
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,
);