copyWith method
- @useResult
- Duration? animationDuration,
- Curve? curve,
- FTappableStyle tappableStyle()?,
- 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,
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:
- WidgetState.disabled
- WidgetState.error
- WidgetState.focused
- WidgetState.hovered
- WidgetState.pressed
- WidgetState.selected
backgroundColor
The FRadio's background color.
The supported states are:
- WidgetState.disabled
- WidgetState.error
- WidgetState.focused
- WidgetState.hovered
- WidgetState.pressed
- WidgetState.selected
indicatorColor
The FRadio's indicator color.
The supported states are:
- WidgetState.disabled
- WidgetState.error
- WidgetState.focused
- WidgetState.hovered
- WidgetState.pressed
- WidgetState.selected
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,
);