copyWith method
- @useResult
- FButtonStyle primary(
- FButtonStyle style
- FButtonStyle secondary(
- FButtonStyle style
- FButtonStyle destructive(
- FButtonStyle style
- FButtonStyle outline(
- FButtonStyle style
- FButtonStyle ghost(
- FButtonStyle style
Returns a copy of this FButtonStyles with the given properties replaced.
Consider using the CLI to generate a style.
Parameters
- FButtonStyles.primary - The primary button style.
- FButtonStyles.secondary - The secondary button style.
- FButtonStyles.destructive - The destructive button style.
- FButtonStyles.outline - The outlined button style.
- FButtonStyles.ghost - The ghost button style.
Implementation
@useResult
FButtonStyles copyWith({
FButtonStyle Function(FButtonStyle style)? primary,
FButtonStyle Function(FButtonStyle style)? secondary,
FButtonStyle Function(FButtonStyle style)? destructive,
FButtonStyle Function(FButtonStyle style)? outline,
FButtonStyle Function(FButtonStyle style)? ghost,
}) => FButtonStyles(
primary: primary != null ? primary(this.primary) : this.primary,
secondary: secondary != null ? secondary(this.secondary) : this.secondary,
destructive: destructive != null ? destructive(this.destructive) : this.destructive,
outline: outline != null ? outline(this.outline) : this.outline,
ghost: ghost != null ? ghost(this.ghost) : this.ghost,
);