NiceUsageTracker class
Tracks which components are actually used at runtime. Call track() when a component is instantiated.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEnabled → bool
-
Whether tracking is enabled.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
usageCounts
→ Map<
String, int> -
Get all usage counts.
no setter
-
usedComponents
→ Set<
String> -
Get all used components.
no setter
Methods
-
clear(
) → void - Clear all tracked data.
-
disable(
) → void - Disable tracking.
-
enable(
) → void - Enable tracking (should be called in debug/profile mode only).
-
generateReport(
) → String - Generate a report of used components.
-
getUsageCount(
String componentName) → int - Get usage count for a component.
-
isUsed(
String componentName) → bool - Check if a component has been used.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
track(
String componentName) → void - Track a component usage.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → NiceUsageTracker
-
final