convokit_flutter_ui library
Extensible, SDK-backed Flutter UI for ConvoKit.
Classes
- ConvoKitConversation
- Plug-and-play SDK-backed UI for one conversation.
- ConvoKitConversationController
- Owns one conversation's history, realtime state, sending, and read markers.
- ConvoKitConversationFilter
- Describes server-side and local filters for a conversation list.
- ConvoKitConversationList
- Plug-and-play conversation list backed by a UI controller.
- ConvoKitConversationListController
- Loads, filters, de-duplicates, and paginates ConvoKit conversations.
- ConvoKitConversationListState
- Immutable snapshot exposed by ConvoKitConversationListController.
- ConvoKitConversationListView
- Controlled, presentation-only list of conversations.
- ConvoKitConversationPageRequest
- Input supplied to a custom conversation page loader.
- ConvoKitConversationState
- Immutable snapshot exposed by ConvoKitConversationController.
- ConvoKitConversationView
- Controlled, complete UI for one selected conversation.
- ConvoKitInboxRow
- One conversation row together with the inbox data rendered beside it.
- ConvoKitMessageItemScope
- Row context handed to ConvoKitMessageItemContextBuilder.
- ConvoKitMessageListView
- Controlled message history with automatic older-message pagination.
- ConvoKitReactionBar
- Reusable reaction controls for hosts that provide a custom message row.
- ConvoKitReactionPickerAction
- An existing message action shown alongside reactions on long press.
- ConvoKitReactionUiClient
- Optional reaction capability for existing custom UI adapters. Implement it to enable reaction state and controls without changing the original client interface used by applications on older SDK versions.
- ConvoKitUiClient
- Replaceable functional boundary used by the ConvoKit UI controllers.
- ConvoKitUiThemeData
- Theme extension used by the default ConvoKit UI components.
- ConvoKitUnreadBadge
-
Default unread badge: the count (or
99+above 99 or when the server capped it) on the theme's badge color, announced as<count> unreadwith the visible label hidden from assistive technology. - ConvoKitUnreadDot
-
Default numberless unread indicator: an 8-point circle on the theme's badge
color, announced as
Unread. Default rows render it in the badge slot whenInboxSummary.isUnreadis true whileunreadCountis 0 and not capped, that is, when the connected user marked the room unread without any unread message; a count or a capped count keeps ConvoKitUnreadBadge. It never announces a number. - DefaultConvoKitUiClient
- Default UI client backed directly by the installed ConvoKit Flutter SDK.
Enums
- ConvoKitMessageWindowMode
- Which range of a room's history the controller currently renders.
Functions
-
convoKitInboxPreview(
{required Conversation conversation, required InboxSummary? summary, required String? currentUserId}) → String? -
The one-line preview the default rows show for
summary, or null when the row should keep its participants/description line: no summary, no latest message, or a message with neither text nor a describable attachment. -
convoKitInboxTimeLabel(
DateTime activityAt) → String -
Formats an activity time the way default message rows format their time:
HH:mmin the device's zone. -
isConvoKitPendingMessage(
Message message) → bool -
Whether
messageis an optimistic row that has not been acknowledged yet. -
showConvoKitReactionPicker(
{required BuildContext context, required List< String> quickEmojis, required Future<bool> toggle(String), required bool isValidEmoji(String), List<ConvoKitReactionPickerAction> actions = const []}) → Future<void> - Shows a WhatsApp-style reaction strip and its attached full emoji picker. The anchor is the add-reaction button directly below the message bubble.
Typedefs
-
ConvoKitAttachmentCallback
= void Function(BuildContext context, Message message, Map<
String, dynamic> attachment) - Called when a default image or file attachment is selected.
- ConvoKitComposerBuilder = Widget Function(BuildContext context, TextEditingController textController, bool isSending, VoidCallback send, VoidCallback? addAttachment)
- Builds a message composer.
- ConvoKitConversationComparator = int Function(Conversation left, Conversation right)
- App-defined ordering applied after all filters.
-
ConvoKitConversationHeaderBuilder
= Widget Function(BuildContext context, Conversation conversation, VoidCallback? onBack, FutureOr<
void> onRefresh()?) - Builds a conversation header.
- ConvoKitConversationItemBuilder = Widget Function(BuildContext context, Conversation conversation, int index, VoidCallback onTap)
- Builds a conversation row and receives the default selection callback.
-
ConvoKitConversationPageLoader
= Future<
List< Function(ConvoKitConversationPageRequest request)Conversation> > - Loads one page of conversations for a UI controller.
- ConvoKitConversationPredicate = bool Function(Conversation conversation)
- Additional app-defined predicate applied to a conversation.
- ConvoKitConversationSeparatorBuilder = Widget Function(BuildContext context, int index)
- Builds the separator between two conversation rows.
-
ConvoKitDeleteConfirmation
= FutureOr<
bool> Function(Message message) -
Asks whether
messageshould be deleted; replaces the built-in dialog. -
ConvoKitDeleteMessageCallback
= FutureOr<
bool> Function(Message message) -
Deletes
messageafter the confirmation and reports whether the row is gone. - ConvoKitInboxItemBuilder = Widget Function(BuildContext context, ConvoKitInboxRow row, VoidCallback onTap)
-
Builds a conversation row from a ConvoKitInboxRow and receives the
default selection callback. When set, it replaces both the default row and
any
itemBuilder. - ConvoKitListErrorBuilder = Widget Function(BuildContext context, Object error, VoidCallback retry)
- Builds an error state with the original error and a retry callback.
- ConvoKitListStateBuilder = Widget Function(BuildContext context, VoidCallback retry)
- Builds list states that may need a retry callback.
-
ConvoKitLoadMoreCallback
= FutureOr<
void> Function() - Callback used by automatic scroll pagination.
-
ConvoKitMediaBlockBuilder
= Widget? Function(BuildContext context, Map<
String, dynamic> block, Message message, bool isCurrentUser) - Builds one structured media block.
-
ConvoKitMessageItemBuilder
= Widget Function(BuildContext context, Message message, int chronologicalIndex, bool isCurrentUser, Participant? sender, Set<
String> readerIds) - Builds an entire message row.
- ConvoKitMessageItemContextBuilder = Widget Function(BuildContext context, ConvoKitMessageItemScope scope)
- Builds an entire message row from a ConvoKitMessageItemScope.
-
ConvoKitMessageReadersResolver
= Set<
String> Function(Message message) - Resolves the users who have read a message.
-
ConvoKitReadReceiptBuilder
= Widget Function(BuildContext context, Message message, Set<
String> readerIds) - Builds optional custom read-receipt UI below a message.
-
ConvoKitSaveEditCallback
= FutureOr<
bool> Function(Message message, String text) -
Saves an edit of
messagewith the composertextand reports whether edit mode ended (false keeps the edited text and edit mode, like a failed send keeps its draft). -
ConvoKitSendTextCallback
= FutureOr<
bool> Function(String text) - Sends composer text and reports whether the draft should be cleared.
-
ConvoKitTypingIndicatorBuilder
= Widget Function(BuildContext context, Set<
String> typingUserIds, String displayNameForUser(String userId)) - Builds the current typing state.