FakeFrameSource class final
Deterministic FrameSource for tests.
Lets test code push synthetic FrameSample batches directly via emit / emitAll; start/stop merely track state through started/stopped. No timers are involved, so tests stay fully synchronous in their arrangement and only await stream delivery.
- Implemented types
Constructors
Properties
-
frames
→ Stream<
FrameSample> -
Stream of converted samples. Must be subscribed before start so no
early samples are dropped by broadcast semantics.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- started → bool
-
Whether start has been called.
no setter
- stopped → bool
-
Whether stop has been called.
no setter
Methods
-
emit(
FrameSample sample) → void - Pushes one synthetic sample to every current listener.
-
emitAll(
Iterable< FrameSample> samples) → void -
Pushes each of
samplesin iteration order. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → Future< void> -
Begins observing the underlying source of frame timings.
override
-
stop(
) → Future< void> -
Stops observing. Implementations must tolerate being called when not
running (idempotent).
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited