PresenceService class abstract
Tracks which users are currently online in a realtime channel.
See FirebasePresenceService for the Firebase RTDB-backed implementation.
- Implementers
Constructors
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
-
connect(
{required String userId, required String channelId, Map< String, dynamic> ? metadata, String? displayName}) → Future<void> -
Marks
userIdas online in the given channel. -
disconnect(
{required String userId, required String channelId}) → Future< void> -
Marks
userIdas offline in the given channel. -
getOnlineUsers(
{required String channelId}) → Future< List< PresenceRecord> > - Returns the current list of online users (one-time fetch).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
watchPresence(
{required String channelId}) → Stream< List< PresenceRecord> > - Emits the list of currently online users whenever it changes.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited