Patch class
A representation of a change to a source file.
The change targets a specific span within the file and specifies the text that would be inserted at that span if applied.
A patch can represent an insertion, a deletion, or a replacement:
- An insertion has a non-empty updatedText value at a "point span", meaning startOffset and endOffset are the same.
- A deletion will have an empty updatedText value with an endOffset that is greater than startOffset. The text across this span will be deleted.
- A replacement will have a non-empty updatedText value with an endOffset that is greater than startOffset. The text across this span will be replaced by updatedText.
Also note that endOffset may be null, in which case it defaults to the end of the file.
Properties
- endOffset → int?
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startOffset → int
-
final
- updatedText → String
-
The value that would be written in place of the existing text across the
sourceSpan
.final
Methods
-
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.
override