copyWith method

  1. @useResult
FPickerStyle copyWith({
  1. double? diameterRatio,
  2. double? squeeze,
  3. double? magnification,
  4. double? overAndUnderCenterOpacity,
  5. double? spacing,
  6. TextStyle? textStyle,
  7. TextHeightBehavior? textHeightBehavior,
  8. double? selectionHeightAdjustment,
  9. BorderRadiusGeometry? selectionBorderRadius,
  10. Color? selectionColor,
  11. FFocusedOutlineStyle focusedOutlineStyle(
    1. FFocusedOutlineStyle
    )?,
})

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

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

diameterRatio

A ratio between the diameter of the cylinder and the viewport's size.

squeeze

The angular compactness of the children on the wheel.

magnification

The zoomed-in rate of the magnifier.

overAndUnderCenterOpacity

The opacity value applied to the wheel above and below the magnifier.

spacing

The spacing between the picker's wheels. Defaults to 5.

Contract

Throws an AssertionError if the spacing is less than 0.

textStyle

The picker's default text style.

textHeightBehavior

The picker's default text height behavior.

selectionHeightAdjustment

An amount to add to the height of the selection.

selectionBorderRadius

The selection's border radius.

selectionColor

The selection's color.

focusedOutlineStyle

The focused outline style.

Implementation

@useResult
FPickerStyle copyWith({
  double? diameterRatio,
  double? squeeze,
  double? magnification,
  double? overAndUnderCenterOpacity,
  double? spacing,
  TextStyle? textStyle,
  TextHeightBehavior? textHeightBehavior,
  double? selectionHeightAdjustment,
  BorderRadiusGeometry? selectionBorderRadius,
  Color? selectionColor,
  FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
}) => FPickerStyle(
  diameterRatio: diameterRatio ?? this.diameterRatio,
  squeeze: squeeze ?? this.squeeze,
  magnification: magnification ?? this.magnification,
  overAndUnderCenterOpacity: overAndUnderCenterOpacity ?? this.overAndUnderCenterOpacity,
  spacing: spacing ?? this.spacing,
  textStyle: textStyle ?? this.textStyle,
  textHeightBehavior: textHeightBehavior ?? this.textHeightBehavior,
  selectionHeightAdjustment: selectionHeightAdjustment ?? this.selectionHeightAdjustment,
  selectionBorderRadius: selectionBorderRadius ?? this.selectionBorderRadius,
  selectionColor: selectionColor ?? this.selectionColor,
  focusedOutlineStyle: focusedOutlineStyle != null
      ? focusedOutlineStyle(this.focusedOutlineStyle)
      : this.focusedOutlineStyle,
);