UserPresence class
Represents user presence information from WebSocket events.
Android Reference: com.cometchat.chat.models.UserPresence
Used to track user online/offline status and last active time. This model is typically received from WebSocket presence events.
Example:
final presence = UserPresence(
jid: 'user123@domain.com',
status: 'online',
lastActiveAt: DateTime.now(),
);
Constructors
- UserPresence({String? jid, String? status, DateTime? lastActiveAt})
-
Creates a UserPresence instance.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- jid → String?
-
The JID (Jabber ID) of the user.
final
- lastActiveAt → DateTime?
-
The timestamp when the user was last active.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → String?
-
The presence status of the user.
final
Methods
-
copyWith(
{String? jid, String? status, DateTime? lastActiveAt}) → UserPresence - Creates a copy with updated fields.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override