AbstractChatRepository class abstract

Chats repository interface.

Implementers

Constructors

AbstractChatRepository()

Properties

archived → Paginated<ChatId, RxChat>
Returns the Paginated of archived RxChats.
no setter
chats → RxObsMap<ChatId, RxChat>
Returns reactive map of all RxChats stored.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasNext → RxBool
Indicates whether the paginated have next page.
no setter
monolog → ChatId
Returns ChatId of the Chat-monolog of the currently authenticated MyUser, if any.
no setter
nextLoading → RxBool
Indicates whether a next page of the paginated is loading.
no setter
paginated → RxObsMap<ChatId, RxChat>
Returns reactive map of RxChats in the current pagination view.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → Rx<RxStatus>
Returns the initialization RxStatus of this repository.
no setter
support → ChatId
Returns ChatId of the support Chat of the currently authenticated MyUser, if any.
no setter

Methods

addChatMember(ChatId chatId, UserId userId) → Future<void>
Adds an User to a Chat-group by the authority of the authenticated MyUser.
archiveChat(ChatId id, bool archive) → Future<void>
Marks the specified Chat as archived for the authenticated MyUser.
clear() → Future<void>
Clears the stored chats.
clearChat(ChatId id, [ChatItemId? untilId]) → Future<void>
Clears an existing Chat (hides all its ChatItems) for the authenticated MyUser until the specified ChatItem inclusively.
createGroupChat(List<UserId> memberIds, {ChatName? name}) → Future<RxChat>
Creates a group Chat with the provided members and the authenticated MyUser, optionally named.
deleteChatForward(ChatForward forward) → Future<void>
Deletes the specified ChatForward posted by the authenticated MyUser.
deleteChatMessage(ChatMessage message) → Future<void>
Deletes the specified ChatMessage posted by the authenticated MyUser.
editChatMessage(ChatMessage message, {ChatMessageTextInput? text, ChatMessageAttachmentsInput? attachments, ChatMessageRepliesInput? repliesTo}) → Future<void>
Edits the specified ChatMessage posted by the authenticated MyUser.
favoriteChat(ChatId id, ChatFavoritePosition? position) → Future<void>
Marks the specified Chat as favorited for the authenticated MyUser and sets its position in the favorites list.
forwardChatItems(ChatId from, ChatId to, List<ChatItemQuoteInput> items, {ChatMessageText? text, List<AttachmentId>? attachments}) → Future<void>
Forwards ChatItems to the specified Chat by the authenticated MyUser.
get(ChatId id) → FutureOr<RxChat?>
Returns an RxChat by the provided id.
getItem(ChatItemId id) → FutureOr<ChatItem?>
Returns a ChatItem by the provided id.
hideChat(ChatId id) → Future<void>
Marks the specified Chat as hidden for the authenticated MyUser.
hideChatItem(ChatId chatId, ChatItemId id) → Future<void>
Hides the specified ChatItem for the authenticated MyUser.
init({Future<void> onMemberRemoved(ChatId, UserId)?, bool? pagination}) → Future<void>
Initializes this repository.
keepTyping(ChatId id) → Stream
Notifies ChatMembers about the authenticated MyUser typing in the specified Chat at the moment.
next() → Future<void>
Fetches the next paginated page.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAll(List<ChatId>? ids) → Future<void>
Marks all the chats as read for the authenticated MyUser until their Chat.lastItems available.
readChat(ChatId chatId, ChatItemId untilId) → Future<void>
Marks the specified Chat as read for the authenticated MyUser until the specified ChatItem inclusively.
remove(ChatId id) → Future<void>
Removes a Chat identified by the provided id from the chats.
removeChatMember(ChatId chatId, UserId userId) → Future<void>
Removes an User from a Chat-group by the authority of the authenticated MyUser.
renameChat(ChatId id, ChatName? name) → Future<void>
Renames the specified Chat by the authority of authenticated MyUser.
resendChatItem(ChatItem item) → Future<void>
Resends the specified item.
sendChatMessage(ChatId chatId, {ChatMessageText? text, List<Attachment>? attachments, List<ChatItem> repliesTo = const []}) → Future<void>
Posts a new ChatMessage to the specified Chat by the authenticated MyUser.
toggleChatMute(ChatId id, MuteDuration? mute) → Future<void>
Mutes or unmutes the specified Chat for the authenticated MyUser. Overrides an existing mute even if it's longer.
toString() → String
A string representation of this object.
inherited
unfavoriteChat(ChatId id) → Future<void>
Removes the specified Chat from the favorites list of the authenticated MyUser.
updateChatAvatar(ChatId id, {NativeFile? file, CropAreaInput? crop, void onSendProgress(int count, int total)?}) → Future<void>
Updates the Chat.avatar field with the provided image, or resets it to null, by authority of the authenticated MyUser.
uploadAttachment(LocalAttachment attachment) → Future<Attachment?>
Creates a new Attachment linked to the authenticated MyUser for a later use in the sendChatMessage method.

Operators

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