LineInfo class

Information about line and column information within a source file.

Constructors

LineInfo(List<int> lineStarts)
Initialize a newly created set of line information to represent the data encoded in the given list of lineStarts.
LineInfo.fromContent(String content)
Initialize a newly created set of line information corresponding to the given file content.
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
lineCount int
The number of lines.
read-only
lineStarts List<int>
A list containing the offsets of the first character of each line in the source code.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getLocation(int offset) → LineInfo_Location
Return the location information for the character at the given offset. [...]
getOffsetOfLine(int lineNumber) int
Return the offset of the first character on the line with the given lineNumber.
getOffsetOfLineAfter(int offset) int
Return the offset of the first character on the line following the line containing the given offset.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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