copyWith method

CellUserSelectionModel copyWith({
  1. IntVector2? anchor,
  2. IntVector2? focus,
  3. SelectionStyle? style,
})

Creates a copy of the selection with the specified properties replaced.

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

Implementation

CellUserSelectionModel copyWith({
  IntVector2? anchor,
  IntVector2? focus,
  SelectionStyle? style,
}) =>
    CellUserSelectionModel.fromAnchorFocus(
      id: id,
      anchor: anchor ?? this.anchor,
      focus: focus ?? this.focus,
      style: style ?? this.style,
    );