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
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
memberas present onchannel, or refreshes them. -
leave(
String channel, String memberId, {bool broadcast = true}) → Future< void> -
members(
String channel) → List< DVPresenceMember> -
Who is on
channelnow, 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
leftfor each. -
useTransport(
DVPresenceTransport transport) → void - Connects the cross-process transport.