copyWith method

  1. @useResult
FRadioStyle copyWith({
  1. Duration? animationDuration,
  2. Curve? curve,
  3. FTappableStyle tappableStyle(
    1. FTappableStyle
    )?,
  4. FFocusedOutlineStyle focusedOutlineStyle(
    1. FFocusedOutlineStyle
    )?,
  5. FWidgetStateMap<Color>? borderColor,
  6. FWidgetStateMap<Color>? backgroundColor,
  7. FWidgetStateMap<Color>? indicatorColor,
  8. EdgeInsetsGeometry? labelPadding,
  9. EdgeInsetsGeometry? descriptionPadding,
  10. EdgeInsetsGeometry? errorPadding,
  11. EdgeInsetsGeometry? childPadding,
  12. FWidgetStateMap<TextStyle>? labelTextStyle,
  13. FWidgetStateMap<TextStyle>? descriptionTextStyle,
  14. TextStyle? errorTextStyle,
})

Returns a copy of this FRadioStyle with the given properties replaced.

Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.

animationDuration

The duration of the animation when the radio switches between selected and unselected. Defaults to 100ms.

curve

The curve of the animation when the radio switches between selected and unselected.

Defaults to Curves.easeOutCirc.

tappableStyle

The tappable style.

focusedOutlineStyle

The focused outline style.

borderColor

The FRadio's border color.

The supported states are:

backgroundColor

The FRadio's background color.

The supported states are:

indicatorColor

The FRadio's indicator color.

The supported states are:

labelPadding

The label's padding.

descriptionPadding

The description's padding.

errorPadding

The error's padding.

childPadding

The child's padding.

labelTextStyle

The label's text style.

Supported states:

descriptionTextStyle

The description's text style.

Supported states:

errorTextStyle

The error's text style.

Implementation

@useResult
FRadioStyle copyWith({
  Duration? animationDuration,
  Curve? curve,
  FTappableStyle Function(FTappableStyle)? tappableStyle,
  FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
  FWidgetStateMap<Color>? borderColor,
  FWidgetStateMap<Color>? backgroundColor,
  FWidgetStateMap<Color>? indicatorColor,
  EdgeInsetsGeometry? labelPadding,
  EdgeInsetsGeometry? descriptionPadding,
  EdgeInsetsGeometry? errorPadding,
  EdgeInsetsGeometry? childPadding,
  FWidgetStateMap<TextStyle>? labelTextStyle,
  FWidgetStateMap<TextStyle>? descriptionTextStyle,
  TextStyle? errorTextStyle,
}) => FRadioStyle(
  animationDuration: animationDuration ?? this.animationDuration,
  curve: curve ?? this.curve,
  tappableStyle: tappableStyle != null ? tappableStyle(this.tappableStyle) : this.tappableStyle,
  focusedOutlineStyle: focusedOutlineStyle != null
      ? focusedOutlineStyle(this.focusedOutlineStyle)
      : this.focusedOutlineStyle,
  borderColor: borderColor ?? this.borderColor,
  backgroundColor: backgroundColor ?? this.backgroundColor,
  indicatorColor: indicatorColor ?? this.indicatorColor,
  labelPadding: labelPadding ?? this.labelPadding,
  descriptionPadding: descriptionPadding ?? this.descriptionPadding,
  errorPadding: errorPadding ?? this.errorPadding,
  childPadding: childPadding ?? this.childPadding,
  labelTextStyle: labelTextStyle ?? this.labelTextStyle,
  descriptionTextStyle: descriptionTextStyle ?? this.descriptionTextStyle,
  errorTextStyle: errorTextStyle ?? this.errorTextStyle,
);