FileMetrics class

Cached metrics about a file's content.

Computed once per file and reused across all rules.

Constructors

FileMetrics({required int lineCount, required int characterCount, required int importCount, required int classCount, required int functionCount, required bool hasAsyncCode, required bool hasWidgets, required bool hasFlutterImport, required bool hasBlocImport, required bool hasProviderImport, required bool hasRiverpodImport})
const

Properties

characterCount int
final
classCount int
final
functionCount int
final
hasAsyncCode bool
final
hasBlocImport bool
Whether file imports package:bloc/ or package:flutter_bloc/
final
hasFlutterImport bool
Whether file imports package:flutter/
final
hashCode int
The hash code for this object.
no setterinherited
hasProviderImport bool
Whether file imports package:provider/
final
hasRiverpodImport bool
Whether file imports package:riverpod/ or package:flutter_riverpod/
final
hasWidgets bool
final
importCount int
final
isLikelyComplex bool
Fast complexity estimation without full AST parsing.
no setter
isTiny bool
Check if file is tiny (likely a model, enum, or simple utility).
no setter
lineCount int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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