mergeWith method

  1. @override
EditOperation mergeWith(
  1. EditOperation other
)
override

Merge this operation with another

Implementation

@override
EditOperation mergeWith(EditOperation other) {
  if (other is! InsertOperation) return this;
  return InsertOperation(
    offset: offset,
    text: text + other.text,
    selectionBefore: selectionBefore,
    selectionAfter: other.selectionAfter,
    timestamp: other.timestamp,
  );
}