LeaksEmitter class abstract
Emits detected memory leaks to an output destination.
Implementations define how leak data is reported, such as writing structured output to disk or printing formatted diagnostics to stdout.
Use the factory constructors to select a concrete implementation:
- LeaksEmitter.json → writes a JSON report file
- LeaksEmitter.print → prints a styled console report
- Implementers
Constructors
- LeaksEmitter.json({required String filePath})
-
Creates an emitter that writes leak information as JSON to
filePath.constfactory - LeaksEmitter.print()
-
Creates an emitter that prints a formatted leak report to stdout.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
emit(
List< Allocation> leaks) → void -
Emits a report for the provided list of
leaks. -
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