DVPresence class

Channel membership.

Not a realtime namespace — the spec forbids one. This is membership state built from authenticated identity, delivered through the same kind of transport seam model sync uses.

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

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

Static Properties

channels → List<String>
Channels with at least one live member for the current tenant.
no setter
events → Stream<DVPresenceEvent>
Every presence change, filtered to the current tenant.
no setter
timeout ↔ Duration
How long a membership survives without a heartbeat.
getter/setter pair

Static Methods

channel(String name) → Stream<DVPresenceEvent>
Changes on one channel.
heartbeat(String channel, String memberId, {Map<String, Object?>? state}) → Future<void>
Refreshes a member's liveness, and optionally their state.
join(String channel, DVPresenceMember member, {bool broadcast = true}) → Future<void>
Records member as present on channel, or refreshes them.
leave(String channel, String memberId, {bool broadcast = true}) → Future<void>
members(String channel) → List<DVPresenceMember>
Who is on channel now, for the current tenant.
reset() → Future<void>
Clears everything. Intended for tests.
startSweeping({Duration every = const Duration(seconds: 15)}) → void
Sweeps on an interval. Call once at boot on a long-lived process.
stopSweeping() → void
sweep() → Future<int>
Drops members whose heartbeat lapsed, emitting a left for each.
useTransport(DVPresenceTransport transport) → void
Connects the cross-process transport.