CodeLineRange class

A range of code that represents a selection.

Inheritance

Constructors

CodeLineRange({required int index, required int start, required int end})
Creates a code range.
const
CodeLineRange.collapsed({required int index, required int offset})
Creates a collapsed range at the given offset.
const
CodeLineRange.empty()
Creates a collapsed range with negative offset.
const
CodeLineRange.from({required int index, required TextRange range})
Creates a code range at the given line index and text range.
factory

Properties

end int
The next index after the characters in this range.
finalinherited
hashCode int
The hash code for this object.
no setteroverride
index int
Line index in the codes.
final
isCollapsed bool
Whether this range is empty (but still potentially placed inside the text).
no setterinherited
isNormalized bool
Whether the start of this range precedes the end.
no setterinherited
isValid bool
Whether this range represents a valid position in the text.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start int
The index of the first character in the range.
finalinherited

Methods

copyWith({int? index, int? start, int? end}) CodeLineRange
Creates a new CodeLineRange based on the current selection, with the provided parameters overridden.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
textAfter(String text) String
The text after this range.
inherited
textBefore(String text) String
The text before this range.
inherited
textInside(String text) String
The text inside this range.
inherited
toString() String
A string representation of this object.
override

Operators

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