copyWith method Null safety

SelectionGeometry copyWith(
  1. {SelectionPoint? startSelectionPoint,
  2. SelectionPoint? endSelectionPoint,
  3. SelectionStatus? status,
  4. bool? hasContent}
)

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

Implementation

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