copyWith method

SelectionGeometry copyWith(
  1. {SelectionPoint? startSelectionPoint,
  2. SelectionPoint? endSelectionPoint,
  3. List<Rect>? selectionRects,
  4. SelectionStatus? status,
  5. bool? hasContent}
)

Makes a copy of this object with the given values updated.

Implementation

SelectionGeometry copyWith({
  SelectionPoint? startSelectionPoint,
  SelectionPoint? endSelectionPoint,
  List<Rect>? selectionRects,
  SelectionStatus? status,
  bool? hasContent,
}) {
  return SelectionGeometry(
    startSelectionPoint: startSelectionPoint ?? this.startSelectionPoint,
    endSelectionPoint: endSelectionPoint ?? this.endSelectionPoint,
    selectionRects: selectionRects ?? this.selectionRects,
    status: status ?? this.status,
    hasContent: hasContent ?? this.hasContent,
  );
}