copyWith method

  1. @useResult
FCheckboxStyle copyWith({
  1. Duration? animationDuration,
  2. Curve? curve,
  3. FTappableStyle tappableStyle(
    1. FTappableStyle
    )?,
  4. FFocusedOutlineStyle focusedOutlineStyle(
    1. FFocusedOutlineStyle
    )?,
  5. double? size,
  6. FWidgetStateMap<IconThemeData>? iconStyle,
  7. FWidgetStateMap<BoxDecoration>? decoration,
  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 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:

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