discontinuedPackage analysis_server_client has been discontinued.

SourceEdit class

SourceEdit

{ "offset": int "length": int "replacement": String "id": optional String }

Clients may not extend, implement or mix-in this class.

Constructors

SourceEdit(int offset, int length, String replacement, {String? id})
SourceEdit.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object? json)
factory

Properties

end → int
The end of the region to be modified.
no setter
hashCode → int
The hash code for this object.
no setteroverride
id ↔ String?
An identifier that uniquely identifies this source edit from other edits in the same response. This field is omitted unless a containing structure needs to be able to identify the edit for some reason.
getter/setter pair
length ↔ int
The length of the region to be modified.
getter/setter pair
offset ↔ int
The offset of the region to be modified.
getter/setter pair
replacement ↔ String
The code that is to replace the specified region in the original code.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(String code) → String
Get the result of applying the edit to the given code.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object>
Returns a JSON presentation of the object.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

applySequence(String code, Iterable<SourceEdit> edits) → String
Get the result of applying a set of edits to the given code. Edits are applied in the order they appear in edits.