copyWith method

  1. @useResult
FButtonStyles copyWith({
  1. FButtonStyle primary(
    1. FButtonStyle
    )?,
  2. FButtonStyle secondary(
    1. FButtonStyle
    )?,
  3. FButtonStyle destructive(
    1. FButtonStyle
    )?,
  4. FButtonStyle outline(
    1. FButtonStyle
    )?,
  5. FButtonStyle ghost(
    1. FButtonStyle
    )?,
})

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,
);