ReplaceOperation class

A replacement operation (delete + insert at same position)

Inheritance

Constructors

ReplaceOperation({required int offset, required String deletedText, required String insertedText, required TextSelection selectionBefore, required TextSelection selectionAfter, DateTime? timestamp})

Properties

deletedText String
The text that was deleted
final
hashCode int
The hash code for this object.
no setterinherited
insertedText String
The text that was inserted
final
offset int
Position where replacement started
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectionAfter TextSelection
The cursor position after this edit
finalinherited
selectionBefore TextSelection
The cursor position before this edit
finalinherited
timestamp DateTime
Timestamp when this edit was made
finalinherited

Methods

canMergeWith(EditOperation other) bool
Check if this operation can be merged with another (for grouping rapid edits)
override
inverse() EditOperation
Create the inverse operation for undo
override
mergeWith(EditOperation other) EditOperation
Merge this operation with another
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited