FirePresenceHandler class
A handler for managing the presence of a user based on connectivity status.
- Inheritance
-
- Object
- FirebasePresenceDataSource
- IFirePresenceHandler
- FirePresenceHandler
Constructors
- FirePresenceHandler.new()
-
Factory constructor to return the singleton instance.
factory
Properties
-
hasConnectionStream
→ Stream<
bool> -
Stream of connectivity status changes.
no setteroverride
- 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 uid, dynamic onSuccess(bool)?, Function? onError}) → Future< void> -
Connects the user and starts listening to connectivity changes.
override
-
dispose(
) → void -
Disposes the resources used by the handler.
override
-
forceDisconnect(
{required String uid, Function? onSuccess, Function? onError}) → void -
Forces the user to disconnect and stops listening to connectivity changes.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
presenceStream(
String uid) → Stream< DatabaseEvent> -
Listens for changes in presence for a specific user (If needed)
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePresence(
{required String uid, required bool isOnline, Function? onSuccess, Function? onError}) → Future< void> -
Updates the user's presence status and sets an
onDisconnect
behavior.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited