ChatRoom class

Represents a chat room

Constructors

ChatRoom({required String userId, required String username, required String latestMessage, required DateTime latestMessageTime, int unreadCount = 0, String? latestMessageStatus, String? avatarUrl})
Constructor
ChatRoom.fromMap(Map<String, dynamic> map)
Creates a ChatRoom from a Map object
factory

Properties

avatarUrl String?
Status of the latest message
final
hashCode int
The hash code for this object.
no setterinherited
latestMessage String
Latest message in the chat room
final
latestMessageStatus String?
Status of the latest message
final
latestMessageTime DateTime
Timestamp of the latest message
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unreadCount int
Number of unread messages
final
userId String
ID of the user in this chat room (not the current user)
final
username String
Username or display name of the other user
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Converts ChatRoom to a Map object
toString() String
A string representation of this object.
inherited

Operators

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