TextEditTransaction class

Editable text transaction.

Applies a series of edits using original location information, and composes them into the edited string.

Constructors

TextEditTransaction(String original, SourceFile file)
Creates a new transaction.

Properties

file SourceFile
final
hasEdits bool
read-only
original String
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

commit() NestedPrinter
Applies all pending edits and returns a NestedPrinter containing the rewritten string and source map information. filename is given to the underlying printer to indicate the name of the generated file that will contains the source map information. [...]
edit(int begin, int end, dynamic replacement) → void
Edit the original text, replacing text on the range begin and end with the replacement. replacement can be either a string or a NestedPrinter.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
@pragma('vm:entry-point'), inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited