SourceCode class

Describes a chunk of source code that is to be formatted or has been formatted.

Constructors

SourceCode(String text, {String? uri, bool isCompilationUnit = true, int? selectionStart, int? selectionLength})

Properties

hashCode int
The hash code for this object.
no setterinherited
isCompilationUnit bool
Whether the source is a compilation unit or a bare statement.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedText String
Gets the selected source code, if any.
no setter
selectionLength int?
The number of selected characters or null if there is no selection.
final
selectionStart int?
The offset in text where the selection begins, or null if there is no selection.
final
text String
The Dart source code text.
final
textAfterSelection String
Gets the source code following the selection.
no setter
textBeforeSelection String
Gets the source code before the beginning of the selection.
no setter
uri String?
The uri where the source code is from.
final

Methods

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