Chat class

Chat is a conversation between Users.

Implemented types
Available extensions

Constructors

Chat(ChatId id, {ChatAvatar? avatar, ChatName? name, List<ChatMember> members = const [], int kindIndex = 0, bool isHidden = false, MuteDuration? muted, ChatDirectLink? directLink, PreciseDateTime? createdAt, PreciseDateTime? updatedAt, List<LastChatRead> lastReads = const [], PreciseDateTime? lastDelivery, ChatItem? firstItem, ChatItem? lastItem, ChatItemId? lastReadItem, int unreadCount = 0, int totalCount = 0, ChatCall? ongoingCall, ChatFavoritePosition? favoritePosition, int membersCount = 0})

Properties

avatar ChatAvatar?
Avatar of this Chat.
getter/setter pair
createdAt PreciseDateTime
PreciseDateTime when this Chat was created.
getter/setter pair
ChatDirectLink to this Chat.
getter/setter pair
favoritePosition ChatFavoritePosition?
Position of this Chat in the favorites list of the authenticated MyUser.
getter/setter pair
firstItem ChatItem?
First ChatItem posted in this Chat.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id ChatId
Unique ID of this Chat.
getter/setter pair
isDialog bool
Indicates whether this Chat is a dialog.
no setter
isGroup bool
Indicates whether this Chat is a group.
no setter
isHidden bool
Indicator whether this Chat is hidden by the authenticated MyUser.
getter/setter pair
isMonolog bool
Indicates whether this Chat is a monolog.
no setter
kind ChatKind
getter/setter pair
kindIndex int
Kind of this Chat.
getter/setter pair
lastDelivery PreciseDateTime
PreciseDateTime when the last ChatItem posted by the authenticated MyUser was delivered.
getter/setter pair
lastItem ChatItem?
Last ChatItem posted in this Chat.
getter/setter pair
lastReadItem ChatItemId?
ID of the last ChatItem read by the authenticated MyUser in this Chat.
getter/setter pair
lastReads List<LastChatRead>
List of this Chat's members which have read it, along with the corresponding LastChatReads.
getter/setter pair
members List<ChatMember>
ChatMembers of this Chat.
getter/setter pair
membersCount int
Total count of members in this Chat.
getter/setter pair
muted MuteDuration?
Mute condition of this Chat for the authenticated MyUser.
getter/setter pair
name ChatName?
Name of this Chat.
getter/setter pair
ongoingCall ChatCall?
Current ongoing ChatCall of this Chat, if any.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalCount int
Count of ChatItems visible to the authenticated MyUser in this Chat.
getter/setter pair
unreadCount int
Count of ChatItems unread by the authenticated MyUser in this Chat.
getter/setter pair
updatedAt PreciseDateTime
PreciseDateTime when the last ChatItem was posted.
getter/setter pair

Methods

colorDiscriminant(UserId? me) String

Available on Chat, provided by the ChatViewExt extension

Returns a string that is based on members or id of this Chat.
compareTo(Chat other, [UserId? me]) int
Compares this object to another object.
override
copyWith() Chat
Returns a copy if this Chat.
getCallCover(UserId? me) UserCallCover?
Returns an UserCallCover of this Chat.
getSubtitle({RxUser? partner}) String?

Available on Chat, provided by the ChatViewExt extension

Returns string represented subtitle of this Chat.
getTitle(Iterable<RxUser> users, UserId? me) String

Available on Chat, provided by the ChatViewExt extension

Returns text represented title of this Chat.
getUser(UserId id) User?
Returns an User identified by its id.
getUserAvatar(UserId? me) UserAvatar?
Returns an UserAvatar of this Chat.
isHalfRead(ChatItem item, UserId? me) bool
Indicates whether the provided ChatItem was read only partially by some User other than me.
isRead(ChatItem item, UserId? me, [List<ChatMember> members = const []]) bool
Indicates whether the provided ChatItem was read by some User other than me.
isReadBy(ChatItem item, UserId? user) bool
Indicates whether the provided ChatItem was read by the given user.
isRoute(String route, UserId? me) bool

Available on Chat, provided by the ChatIsRoute extension

Indicates whether the provided route represents this Chat.
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