copyWith method

HeaderUserSelectionModel copyWith({
  1. int? anchor,
  2. int? focus,
  3. Axis? axis,
  4. SelectionStyle? style,
})

Creates a copy of HeaderUserSelectionModel with the specified properties replaced.

Calling this method on a selection will return a new transformed selection based on the provided properties.

Implementation

HeaderUserSelectionModel copyWith({
  int? anchor,
  int? focus,
  Axis? axis,
  SelectionStyle? style,
}) =>
    HeaderUserSelectionModel.fromAnchorFocus(
      id: id,
      anchor: anchor ?? this.anchor,
      focus: focus ?? this.focus,
      axis: axis ?? this.axis,
      style: style ?? this.style,
    );