FakeVooWatchTransport class

In-process VooWatchTransport for widget tests and web/desktop hot-reload previews.

Anything sent via send is recorded in sentPayloads. Tests inject inbound traffic by calling emit / emitReachability. No platform channel is touched, so this works in the Flutter test runner without a paired device — and on Flutter web/desktop where the voo_watch/method channel has no implementation. VooWatch.instance picks this transport automatically when kIsWeb is true.

Implemented types

Constructors

FakeVooWatchTransport()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sentPayloads → List<({String channel, Map<String, Object?> payload})>
All payloads passed to send, in order, keyed by channel.
final

Methods

dispose() → Future<void>
Tear down any subscriptions / sinks.
override
emit(String channel, Map<String, Object?> payload) → void
Test helper: simulate an inbound payload on channel.
emitReachability(VooWatchReachability state) → void
Test helper: simulate a reachability change.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reachability() → Stream<VooWatchReachability>
Reachability stream (already decoded for convenience).
override
receive(String channel) → Stream<Map<String, Object?>>
Stream of payloads received on a channel.
override
send(String channel, Map<String, Object?> payload) → Future<void>
Send a payload on a channel (one-way, fire-and-forget acknowledged).
override
toString() → String
A string representation of this object.
inherited

Operators

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