copyWith method
- @useResult
- FButtonStyle primary()?,
- FButtonStyle secondary()?,
- FButtonStyle destructive()?,
- FButtonStyle outline()?,
- FButtonStyle ghost()?,
Returns a copy of this FButtonStyles with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
primary
The primary button style.
secondary
The secondary button style.
destructive
The destructive button style.
outline
The outlined button style.
ghost
The ghost button style.
Implementation
@useResult
FButtonStyles copyWith({
FButtonStyle Function(FButtonStyle)? primary,
FButtonStyle Function(FButtonStyle)? secondary,
FButtonStyle Function(FButtonStyle)? destructive,
FButtonStyle Function(FButtonStyle)? outline,
FButtonStyle Function(FButtonStyle)? 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,
);