copyWith method
- @useResult
- Duration? animationDuration,
- Curve? curve,
- FTappableStyle tappableStyle()?,
- FFocusedOutlineStyle focusedOutlineStyle()?,
- double? size,
- FWidgetStateMap<
IconThemeData> ? iconStyle, - FWidgetStateMap<
BoxDecoration> ? decoration, - EdgeInsetsGeometry? labelPadding,
- EdgeInsetsGeometry? descriptionPadding,
- EdgeInsetsGeometry? errorPadding,
- EdgeInsetsGeometry? childPadding,
- FWidgetStateMap<
TextStyle> ? labelTextStyle, - FWidgetStateMap<
TextStyle> ? descriptionTextStyle, - TextStyle? errorTextStyle,
Returns a copy of this FCheckboxStyle 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 checkbox switches between checked and unchecked. Defaults to 100ms.
curve
The curve of the animation when the checkbox switches between checked and unchecked.
Defaults to Curves.linear.
tappableStyle
The tappable style.
focusedOutlineStyle
The focused outline style.
size
The checkboxes size. Defaults to 16.
iconStyle
The icon style.
Supported states:
decoration
The box decoration.
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
FCheckboxStyle copyWith({
Duration? animationDuration,
Curve? curve,
FTappableStyle Function(FTappableStyle)? tappableStyle,
FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
double? size,
FWidgetStateMap<IconThemeData>? iconStyle,
FWidgetStateMap<BoxDecoration>? decoration,
EdgeInsetsGeometry? labelPadding,
EdgeInsetsGeometry? descriptionPadding,
EdgeInsetsGeometry? errorPadding,
EdgeInsetsGeometry? childPadding,
FWidgetStateMap<TextStyle>? labelTextStyle,
FWidgetStateMap<TextStyle>? descriptionTextStyle,
TextStyle? errorTextStyle,
}) => FCheckboxStyle(
animationDuration: animationDuration ?? this.animationDuration,
curve: curve ?? this.curve,
tappableStyle: tappableStyle != null ? tappableStyle(this.tappableStyle) : this.tappableStyle,
focusedOutlineStyle: focusedOutlineStyle != null
? focusedOutlineStyle(this.focusedOutlineStyle)
: this.focusedOutlineStyle,
size: size ?? this.size,
iconStyle: iconStyle ?? this.iconStyle,
decoration: decoration ?? this.decoration,
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,
);