Conversation class

A chat conversation (direct message or group).

Available extensions

Constructors

Conversation({required String id, required ConversationType type, required ConversationMode mode, String? name, String? avatarUrl, ConversationStatus status = ConversationStatus.active, List<Participant> participants = const [], Message? lastMessage, DateTime? lastMessageAt, int unreadCount = 0, ParticipantRole myRole = ParticipantRole.member, String? myUserId, Map<String, dynamic>? metadata, DateTime? createdAt, DateTime? updatedAt})
Creates a conversation.
const

Properties

approvedParticipantsCount → int
no setter
avatarUrl → String?
final
createdAt → DateTime?
final
displayAvatar → String?
no setter
displayName → String
no setter
hasDeletedParticipant → bool
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasUnread → bool
no setter
id → String
final
isActive → bool
no setter
isAdmin → bool
no setter
isArchived → bool
no setter
isDirect → bool
no setter
isEphemeral → bool
no setter
isGroup → bool
no setter
isStandard → bool
no setter
lastActivityLabel → String

Available on Conversation, provided by the ConversationExtensions extension

Human-readable label for the last activity time.
no setter
lastMessage → Message?
final
lastMessageAt → DateTime?
final
metadata → Map<String, dynamic>?
final
mode → ConversationMode
final
myRole → ParticipantRole
final
myUserId → String?
final
name → String?
final
onlineParticipantsCount → int
no setter
otherParticipant → Participant?
no setter
participants → List<Participant>
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → ConversationStatus
final
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
type → ConversationType
final
unreadCount → int
final
updatedAt → DateTime?
final

Methods

copyWith({String? id, String? name, String? avatarUrl, ConversationType? type, ConversationMode? mode, ConversationStatus? status, List<Participant>? participants, Message? lastMessage, DateTime? lastMessageAt, int? unreadCount, ParticipantRole? myRole, String? myUserId, Map<String, dynamic>? metadata, DateTime? createdAt, DateTime? updatedAt}) → Conversation
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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