copyWith method
Creates a new DocumentPosition based on the current position, with the provided parameters overridden.
Implementation
DocumentPosition copyWith({
String? nodeId,
NodePosition? nodePosition,
}) {
return DocumentPosition(
nodeId: nodeId ?? this.nodeId,
nodePosition: nodePosition ?? this.nodePosition,
);
}