RealtimePresence class

Constructors

RealtimePresence(RealtimeChannel channel, [PresenceOpts? opts])
Initializes the Presence

Properties

caller Map<String, dynamic>
getter/setter pair
channel RealtimeChannel
final
hashCode int
The hash code for this object.
no setterinherited
joinRef String?
getter/setter pair
pendingDiffs List<Map<String, dynamic>>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state Map<String, List<Presence>>
getter/setter pair

Methods

inPendingSyncState() bool
list<T>([PresenceChooser<T>? by]) List<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onJoin(PresenceOnJoinCallback callback) → void
onLeave(PresenceOnLeaveCallback callback) → void
onSync(void callback()) → void
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

syncDiff(Map<String, List<Presence>> state, Map<String, dynamic> diff, [PresenceOnJoinCallback? onJoin, PresenceOnLeaveCallback? onLeave]) Map<String, List<Presence>>
Used to sync a diff of presence join and leave events from the server, as they happen.
syncState(Map<String, List<Presence>> currentState, Map<String, dynamic> newState, [PresenceOnJoinCallback? onJoin, PresenceOnLeaveCallback? onLeave]) Map<String, List<Presence>>
Used to sync the list of presences on the server with the client's state.