StyleFile class final

A parsed Dart file that style rules inspect.

The file is parsed without resolution: rules see the syntax tree, not types, which keeps the check fast and independent of dart pub get.

Constructors

StyleFile({required String path, required String content, required CompilationUnit unit, required LineInfo lineInfo})
Creates the file at path, relative to the package root with / as separator, whose text content parses to unit.
const

Properties

content → String
The text of the file.
final
hashCode → int
The hash code for this object.
no setterinherited
isPart → bool
Whether the file is a part of another library.
no setter
lineInfo → LineInfo
Maps offsets in content to lines and columns.
final
name → String
The file name without directory and .dart extension, such as user_repository.
no setter
path → String
The path relative to the package root, with / as separator.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unit → CompilationUnit
The syntax tree of the file.
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