copyWith method

  1. @useResult
FResizableDividerStyle copyWith({
  1. Color? color,
  2. double? width,
  3. FFocusedOutlineStyle focusedOutlineStyle(
    1. FFocusedOutlineStyle
    )?,
  4. FResizableDividerThumbStyle thumbStyle(
    1. FResizableDividerThumbStyle
    )?,
})

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

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

color

The divider's color.

width

The divider's width (thickness). Defaults to 0.5.

Contract

Throws AssertionError if width <= 0.

focusedOutlineStyle

The focused outline style.

thumbStyle

The divider thumb's style.

Implementation

@useResult
FResizableDividerStyle copyWith({
  Color? color,
  double? width,
  FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
  FResizableDividerThumbStyle Function(FResizableDividerThumbStyle)? thumbStyle,
}) => FResizableDividerStyle(
  color: color ?? this.color,
  width: width ?? this.width,
  focusedOutlineStyle: focusedOutlineStyle != null
      ? focusedOutlineStyle(this.focusedOutlineStyle)
      : this.focusedOutlineStyle,
  thumbStyle: thumbStyle != null ? thumbStyle(this.thumbStyle) : this.thumbStyle,
);