FileLocation class Null safety

A SourceLocation within a SourceFile.

Unlike the base SourceLocation, FileLocation lazily computes its line and column values based on its offset and the contents of file.

A FileLocation can be created using SourceFile.location.

Inheritance
Implemented types

Properties

column int
The 0-based column of this location in the source
read-onlyoverride
file SourceFile
The file that this belongs to.
final
hashCode int
The hash code for this object.
read-onlyinherited
line int
The 0-based line of this location in the source.
read-onlyoverride
offset int
The 0-based offset of this location in the source.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
sourceUrl Uri?
URL of the source containing this location.
read-onlyoverride
toolString String
Returns a representation of this location in the source:line:column format used by text editors.
read-onlyinherited

Methods

compareTo(SourceLocation other) int
Compares two locations.
inherited
distance(SourceLocation other) int
Returns the distance in characters between this and other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
pointSpan() FileSpan
Returns a span that covers only a single point: this location.
override
toString() String
A string representation of this object.
inherited

Operators

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