FixedMemoryMonitor class final

A monitor that always reports the same snapshot.

The web/unsupported-platform fallback, and a convenient test double.

Implemented types

Constructors

FixedMemoryMonitor(MemorySnapshot snapshot)
Creates a monitor pinned to snapshot.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshot MemorySnapshot
The snapshot every sample returns. Mutable so tests can steer it.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sample() Future<MemorySnapshot>
Takes a fresh measurement.
override
toString() String
A string representation of this object.
inherited

Operators

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