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
no setter
hashCode int
The hash code for this object.
no setterinherited
original String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

commit() NestedPrinter
Applies all pending edits and returns a NestedPrinter containing the rewritten string and source map information. file.location 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, Object 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 nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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