EditOperation class sealed

Represents a single text edit operation to be applied to the editor.

Annotations
  • @freezed

Constructors

EditOperation({required Range range, required String text, bool? forceMoveMarkers})
Creates an edit operation.
const
factory
EditOperation.delete({required Range range, bool? forceMoveMarkers})
A convenience factory for creating a deletion operation over a range.
factory
EditOperation.fromJson(Map<String, dynamic> json)
Creates an EditOperation from a JSON map.
factory
EditOperation.insert({required Position position, required String text, bool? forceMoveMarkers})
A convenience factory for creating an insertion operation at a position.
factory

Properties

copyWith → $EditOperationCopyWith<EditOperation>
Create a copy of EditOperation with the given fields replaced by the non-null parameter values.
no setterinherited
forceMoveMarkers bool?
If true, forces markers to move with the text.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
range Range
The range of text to be replaced.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
The new text to insert. An empty string results in a deletion.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the edit operation to a JSON-compatible map.
toString() String
A string representation of this object.
inherited

Operators

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