noma_chat library

Plug & play chat package for Flutter, backed by the Noma Chat backend.

Exposes three layers, each usable independently:

The typical entry point is NomaChat.create, which wires all three:

final chat = await NomaChat.create(
  baseUrl: 'https://chat.myapp.com/v1',
  realtimeUrl: 'https://chat.myapp.com',
  tokenProvider: () => authService.getToken(),
  currentUser: ChatUser(id: userId, displayName: name),
);
await chat.connect();

Classes

AggregatedReaction
An emoji reaction with its count and the list of users who reacted.
AttachmentMediaLoader
Fetches an attachment's bytes (or a local file holding them) for a bubble to render, given its AttachmentRef.
AttachmentPickers
Convenience entry points for the most common attachment flows in chat composers. Wraps image_picker and file_picker so consumers don't have to (re)wire them.
AttachmentPickerSheet
Bottom sheet with attach options.
AttachmentPickResult
ChatResult of an attachment picker call.
AttachmentPolicy
Declarative attachment-validation policy.
AttachmentPolicyViolation
Concrete rejection emitted by AttachmentPolicy.validate.
AttachmentRef
Identifies the attachment a bubble needs a download URL for.
AttachmentRejection
Surfaces why AttachmentPickers dropped a pick instead of returning it.
AttachmentsApi
REST implementation of ChatAttachmentsApi for uploading and downloading files plus listing per-room attachments.
AttachmentSheetOption
One row inside AttachmentPickerSheet. Used both for the built-in Camera/Gallery/File/Location options and to inject app-specific extras (e.g. "Send contact card", "Send poll", "Share plan").
AttachmentSignedUrl
A short-lived, signed download URL for an attachment.
AttachmentUploadResult
ChatResult of an attachment upload containing the server-assigned ID and optional URL.
AudioBubble
Bubble for a voice message: play/pause, waveform, duration, and optional upload-progress overlay while the audio is still being sent.
AudioPlaybackCoordinator
Coordinates exclusive playback across multiple AudioBubbles and chains auto-play to the next unlistened incoming voice note.
AuthApi
REST implementation of ChatAuthApi backed by the SDK's HTTP client.
AuthenticatedAttachmentLoader
Default AttachmentMediaLoader: downloads bytes via ChatAttachmentsApi.download (Dio + Bearer under the hood) and caches them — in memory for instant re-renders (scrolling a bubble off/on screen), and on disk (the app's temp directory) for players that need a file path rather than raw bytes (DeviceFileSource for audio, a video file for playback).
AuthFailure
Authentication failed (401). Token may be expired or invalid.
AvatarCropPage
Square-aspect-ratio crop using image_cropper's native UIs (TOCropViewController on iOS, UCrop on Android). The picked image is dumped to a temp file because the plugin only operates on file paths, then re-read as bytes for the SDK upload pipeline.
AvatarPicked
AvatarPickerCancelled
AvatarPickerField
Composable circular avatar with an "edit" affordance overlaid. Tapping the avatar opens AvatarPickerSheet and, on success, holds the picked bytes in internal state so the caller can read them on submit.
AvatarPickerOutcome
Outcome surfaced by AvatarPickerSheet.show. Picked carries the post-crop bytes ready for upload; Removed is the "clear photo" signal; Cancelled is the dismissal default.
AvatarPickerSheet
WhatsApp-style bottom sheet for selecting a profile or group photo. Shows Camera / Gallery / View / Remove rows; the last two appear only when initialAvatarUrl is non-null. Selections from camera or gallery are routed through AvatarCropPage for a square crop before returning. Cancelling at any step yields AvatarPickerCancelled.
AvatarRemoved
AvatarSnapshot
In-memory image bytes plus mime type, ready for upload through AvatarStorage. Produced by AvatarPickerSheet after the user crops their selection.
AvatarStorage
Pluggable storage backend for profile and room avatars.
BlockedChatBanner
Replaces the composer when the local user has blocked the other party in a DM. WhatsApp-style: the chat stays open with full history, but the input is swapped for a tappable bar that surfaces the block and offers an immediate unblock.
BlockedUsersView
Lists the contacts the current user has blocked, with per-row "Unblock" action that confirms before calling client.contacts.unblock(userId).
BroadcastEvent
BufferChatLogSink
In-memory ring buffer sink. Keeps at most capacity records (oldest dropped first) so a long-lived session doesn't grow the buffer unbounded. export renders the buffered records — optionally filtered — as plain text, ready to write to a file (see ChatLogExporter) or copy to the clipboard.
BulkPresenceResponse
Response from a bulk presence query containing the user's own presence and contacts.
CachedMessagesApi
Cache-aware decorator over RestMessagesApi.
CallbackChatLogSink
Bridges a ChatLogRecord stream to the legacy void Function(String level, String message)? callback that ChatConfig.logger has always accepted. Used internally by ChatConfig's sink derivation so a host that only ever wired logger: keeps receiving lines unchanged — the structured pipeline is purely additive.
CameraCaptureButton
The shutter of CameraCapturePage: tap to shoot, hold to record.
CameraCapturePage
Full-screen in-app camera: tap the shutter for a still, hold it to record a clip. Pops with a CameraCaptureResult, or null when the user backs out.
CameraCaptureResult
What CameraCapturePage hands back: the shot the user just took plus whether it is a clip, so callers pick a mime type without sniffing the extension.
CameraCaptureReview
The confirmation step between the shutter and the send: a full-screen look at what was just captured, with exactly three ways out.
CameraVideoPreview
Playable preview of a clip that has just been recorded and is waiting to be sent — the video half of CameraCaptureReview.
CancelledFailure
The operation was deliberately aborted by the caller — e.g. a host cancelling an in-flight attachment upload — rather than failing on its own. Kept distinct from NetworkFailure so callers can skip the failed-message / retry treatment for an outcome the user chose.
ChatAnalyticsEvent
A product-analytics-shaped occurrence the SDK observed.
ChatAttachmentsApi
File upload, download, and per-room attachment management.
ChatAuthApi
Server health and authentication checks.
ChatBubbleTheme
Theme for the message bubble surface — the rounded card that wraps every regular message, regardless of payload (text / attachment / reply / etc.).
ChatClient
Entry point for all chat operations.
ChatConfig
Configuration for a ChatClient instance.
ChatContact
A contact in the user's contact list, identified by user ID.
ChatContactsApi
Contact list, direct messaging, typing indicators, and blocking.
ChatContactsController
Contact / blocked-users operations exposed by ChatUiAdapter.contacts.
ChatController
Manages the state of a single chat conversation: messages, typing indicators, reactions, receipts, reply/edit state, and pagination.
ChatCursorPaginationParams
Cursor-based pagination.
ChatDmController
Direct-message helpers exposed by ChatUiAdapter.dm.
ChatError
Lightweight error type emitted by UI controllers when SDK calls fail.
ChatErrorTokens
Well-known stable error tokens the SDK reasons about. The server's vocabulary is open-ended and larger than this set — these are only the tokens with first-class SDK handling or that host apps commonly branch on. Compare a ChatFailure.errorToken against these constants instead of hard-coding string literals; unknown tokens still arrive verbatim on ChatFailure.errorToken.
ChatEvent
A real-time event received from the chat server.
ChatExport
The result of ChatMessagesController.exportChat: a room's history rendered to a single WhatsApp-style plain-text transcript.
ChatFailure
Base class for all SDK failure types.
ChatFailureResult<T>
A failed result containing a ChatFailure describing what went wrong.
ChatInputTheme
Theme for the message composer — text field, send / attach / voice / camera buttons, editing banner and reply preview. Captures every visual surface that lives between the conversation and the keyboard.
A group-invite deep link: the roomId to join plus the public-room token that authorises the join.
ChatLifecyclePolicy
Governs how ChatUiAdapter reacts to app foreground/background transitions when it manages its own WidgetsBindingObserver (manageAppLifecycle: true on the adapter / NomaChat.create).
ChatLocalDatasource
Contract for local data persistence in the chat SDK.
ChatLogExporter
Writes a BufferChatLogSink's records to a shareable file.
ChatLogger
Filters, formats and dispatches ChatLogRecords to a ChatLogSink.
ChatLogRecord
A single structured log entry.
ChatLogSink
Destination for ChatLogRecords. Implementations must not throw from add — a logging sink must never be the reason a request fails.
ChatMarkdownTheme
Theme for the inline-markdown styles applied by parseMarkdown inside text bubbles. Each token type maps to a single TextStyle that inherits from the bubble's base text style — only override the deltas (color, weight, decoration) for best results.
ChatMembersApi
Room membership: invitations, removal, bans, and role management.
ChatMessage
A chat message with text, attachments, reactions, and metadata.
ChatMessagesApi
Messaging: send, edit, delete, receipts, typing, threads, reactions, pins, search, scheduling.
ChatMessagesController
Per-message domain operations exposed by ChatUiAdapter.messages.
ChatNoticeScope
Optional host override for every short notice the SDK shows on its own (an unblock that failed, a group that couldn't be created, a role change the server refused…).
ChatPaginatedResponse<T>
A page of results with a flag indicating whether more data is available.
ChatPaginationParams
Offset-based pagination parameters.
ChatPresence
A user's online presence with status and last-seen timestamp.
ChatPresenceApi
Presence management for the current user and contacts.
ChatProfileController
Current-user profile operations exposed by ChatUiAdapter.profile.
ChatResult<T>
Represents the outcome of an SDK operation: either ChatSuccess with data or ChatFailureResult with a ChatFailure.
ChatRoom
A chat room with its basic metadata and member list.
ChatRoomAppBar
Drop-in AppBar for a chat room.
ChatRoomListTheme
Theme for the room list — tiles, unread badges, presence dots, search bar, suggestions strip and section headers.
ChatRoomOption
One entry in the ChatRoomOptionsMenu bottom sheet. Construct directly for fully custom options, or use one of the named factories (ChatRoomOption.clearChat, ChatRoomOption.deleteChat) for the WhatsApp-style presets.
ChatRoomOptionConfirmation
Confirmation dialog config attached to a ChatRoomOption. When present, ChatRoomOptionsMenu shows the dialog after the user taps the option; the action only fires if the user confirms.
ChatRoomOptionsMenu
Bottom sheet with chat-room actions (clear, delete, mute, pin, …).
ChatRoomsApi
Room lifecycle: creation, listing, discovery, configuration, and user preferences.
ChatRoomsController
Room-level operations exposed by ChatUiAdapter.rooms.
ChatSuccess<T>
A successful result containing data.
ChatTheme
Theming configuration for all chat UI components widgets.
ChatUiAdapter
Context handed to a RoomTitleResolver when the adapter (re)computes the effective title for a room. detail and otherMembers may be empty/null during incremental enrichments (e.g. before the DM contact has been resolved) — a robust resolver should tolerate that and either return null (to defer) or operate on currentItem only.
ChatUiLocalizations
Localized strings for all chat UI components widgets.
ChatUser
A chat platform user with profile information and role.
ChatUsersApi
User search, creation, profile updates, and managed-user operations.
ChatView
All-in-one chat screen body: message list + composer + optional banners.
ChatViewBehaviors
Pure data / boolean configuration for ChatView — anything that changes appearance or behaviour but is not a callback or builder.
ChatViewBuilders
Visual builder / resolver overrides for ChatView.
ChatViewCallbacks
Imperative callbacks fired by ChatView in response to user interactions (send, edit, delete, reactions, attachments, …).
ConflictFailure
Resource already exists or conflicts with current state (409).
ConnectedEvent
ConnectionBanner
Horizontal banner showing the current connection state (connecting, reconnecting, disconnected, error).
ConsoleChatLogSink
Sink that prints each record via debugPrint — no-op in release builds (same tree-shaking as the rest of the SDK's debug-only logging).
ContactsApi
REST implementation of ChatContactsApi (contacts list + DMs + block list).
ContactSuggestionsBar
Horizontal strip of suggested contacts shown above the chat list as a shortcut to start a new conversation.
ContentFilterFailure
Message blocked by a server-side content filter (400).
DateFormatter
Date/time formatting helpers used by the UI components (date separators, timestamps in bubbles, last-message previews). Locale comes from ChatUiLocalizations.
DateSeparator
Centered date pill inserted between groups of messages on different days.
DefaultAvatarStorage
Default AvatarStorage backed by ChatClient.attachments.upload. The chat backend persists the bytes through whatever attachment module is configured (CHT GFS, inline collection, S3 module, …) and returns the reachable URL. delete is a no-op (CHT attachments aren't deletable today) and thumbnailUrl returns null (no transform pipeline).
DefaultEmptyRoomState
The card a host that wires no EmptyRoomBuilder sees: the SDK's own explanation plus, in a 1:1 that can be written to, a one-tap first message so the room is never a dead end.
DefaultPalette
Hardcoded fallback colors used when a ChatTheme field is left as null. Centralized here so the look-and-feel stays consistent across widgets that don't share a theme field (banners, separators, muted UI rows).
DeleteWindowExpiredFailure
The "delete for everyone" window for a message has closed — the backend rejects the delete with a 403 delete_window_expired.
DeliveryReceiptClient
Standalone entry point for confirming message delivery without instantiating a full NomaChatClient.
DeliveryStatusLegendEntry
One row of DeliveryStatusLegendSheet: the glyph the timeline paints for state, its short name and the sentence that explains it.
DeliveryStatusLegendSheet
"What the checks mean" — the consultable legend for the delivery ticks the timeline paints on outgoing messages.
DisconnectedEvent
DiscoveredRoom
A public room found via discovery search.
DmActivityEvent
DocsListView
Displays a list of document attachments (PDFs, docs, spreadsheets, archives, generic files). Audio attachments are excluded by default to mirror WhatsApp's "Docs" tab behaviour.
EditWindowExpiredFailure
The edit window for a message has closed — the backend rejects the edit with a 403 edit_window_expired (it allows edits only for a configured time after a message is sent). The SDK also hides MessageAction.edit past the window; this surfaces a late attempt that slipped through (e.g. clock skew, a stale menu).
EmptyRoomInfo
Everything the SDK knows about a room that has no messages yet, handed to an EmptyRoomBuilder so the host can turn the hole into a starting card of its own — the plan the room was opened about, who organizes it, the actions that belong next to it.
EmptyRoomState
The room's opening card: an explanation, whatever the host wants to put above it, and the actions that turn the hole into a starting point.
EmptyState
Placeholder widget shown when a list (messages or rooms) is empty.
ErrorEvent
FailedUploadRegistry
Holds the bytes of uploads that failed, keyed by the optimistic row's id, so "Retry" on a failed media bubble means something.
FileBubble
Bubble for a generic file attachment: shows name + size + open action.
FloatingReactionPicker
Floating overlay that shows predefined reactions near a message.
ForbiddenFailure
User lacks permission for the requested operation (403).
ForwardedBubble
Decorates child with a "Forwarded" header and optional source room label, used when the underlying message was forwarded from another room.
ForwardInfo
Metadata about a forwarded message: original sender, room, and message ID.
FullEmojiPicker
Full emoji picker shown as a bottom sheet.
GroupCreationResult
Result of a successful group creation. Returned by GroupSetupPage.show so the caller can navigate straight into the newly-minted room.
GroupInfoPage
WhatsApp-style unified "Group info" page. Replaces the older GroupInfoEditSheet (avatar+name only) and GroupMembersView (members only) by stacking both in a single full-screen flow:
GroupMembersView
Members management view for a group room. Loads the current member list via the SDK adapter, sorts owner → admin → member (alphabetical inside each tier), and exposes per-row actions for admins:
GroupSetupPage
WhatsApp-style "new group" screen — single-page flow that gathers avatar, name, optional description and the member list in one place. The classic two-step flow (pick members → name the group) remains supported by pre-populating initialMembers; consumers that want the unified flow can leave it empty and let the user pick inside this page.
HealthStatus
Server health status with individual service check results.
HiveAesCipher
Default encryption algorithm. Uses AES256 CBC with PKCS7 padding.
HiveChatDatasource
Persistent ChatLocalDatasource implementation backed by Hive CE.
HiveCipher
Abstract cipher can be implemented to customize encryption.
ImageBubble
Bubble that renders an image attachment with cached network loading and tap-to-open behavior.
ImageViewer
Full-screen image viewer with pinch-to-zoom, used when tapping an image bubble or gallery thumbnail.
InvitedRoom
A pending room invitation showing who invited the current user.
InviteResult
Result of inviting one or more users to a room.
InviteUserResult
Per-user outcome of a batch invite (POST /rooms/{roomId}/users).
LinkPreviewBubble
Bubble decoration that renders the OpenGraph-style preview of a link (image, title, description) above the underlying text bubble.
LinkPreviewCacheStats
Snapshot of LinkPreviewFetcher's in-memory LRU + failure-TTL caches, plus running counters of how the cache has been used since process start.
LinkPreviewFetcher
Fetches Open Graph metadata for URLs typed in the chat composer.
LinkPreviewMetadata
Open Graph / oEmbed-like metadata extracted from a URL. The chat composer fetches it on the fly while the user types and embeds it in the outgoing message so the receiver renders the same preview without re-fetching.
LinksListView
Lists URLs extracted client-side from regular text messages. Designed for the "Links" tab of MediaGalleryPage, where the surface is intentionally limited to messages already present in the local cache (no extra round trip).
LocationBubble
Bubble for a shared location: shows a static map preview centered on the coordinates and opens the system maps app on tap.
MarkdownSpan
One contiguous slice of text emitted by parseMarkdown, carrying its style and (for links/mentions) the target URL or user id.
MediaGalleryPage
WhatsApp-style "Shared in this chat" page with three tabs: Media, Docs and Links. Voice notes and audio attachments are excluded by default.
MediaGalleryView
Grid view of MediaItems, used as the Media tab of MediaGalleryPage.
MediaItem
One entry shown in MediaGalleryView: a remote URL plus optional timestamp/sender/file metadata.
MemberEntry
A user paired with their per-room RoomRole, shown in MemberListView.
MemberListView
Sorted list of members for a room; offers role badges and admin actions (kick/promote) gated on the caller's currentUserRole.
MemberPickerSheet
Bottom-sheet contact picker designed to drive the "Add members" flow of a group room. Multi-select with confirm button.
MembersApi
REST implementation of ChatMembersApi.
MentionOverlay
Floating list of matching users displayed above the composer when the user types @; tapping inserts the mention.
MessageAckedEvent
MessageBubble
Renders a single message as a styled bubble with support for text, images, audio, video, files, link previews, forwarded labels, reactions, receipts, and threads.
MessageContextMenu
Long-press context menu for a single message: returns the selected MessageAction (or null if dismissed).
MessageDeletedEvent
MessageDeliveredEvent
MessageForwardSheet
"Forward to…" picker.
MessageInfoSheet
WhatsApp-style "Message info" bottom sheet: lists which room members have read a message and which have only been delivered it.
MessageInput
Composer for the chat: text field, attach/voice buttons, reply preview and editing affordances. Reads/edits state through the bound ChatController and reports user actions via the on… callbacks.
MessageInputVoiceController
High-level state machine of the voice recorder gesture inside the composer. Wraps the lower-level VoiceRecordingController and adds:
MessageList
Scrollable list of message bubbles with date separators, typing indicator, scroll-to-bottom button, and automatic pagination on scroll.
MessagePin
A pinned message reference with who pinned it and when.
MessageReceiptDetail
One member row of MessageInfoSheet, resolved against the message being inspected.
MessageReport
A moderation report filed against a message.
MessageSearchController
Controller for searching messages within a room, with loading state and pagination.
MessageSearchView
Full-text search UI for messages within a room, with debounced input and result tapping.
MessageStatusIcon
Small check-icon stack indicating the ReceiptStatus of an outgoing message (sent / delivered / read).
MessageStatusIconData
Context handed to MessageStatusIconBuilder overrides.
MessageUpdatedEvent
MultiChatLogSink
Fans a single add/flush/close call out to every sink in sinks. Lets a host combine, e.g., a console sink (developer visibility) with a buffer sink (exportable for support) without picking one or the other. A throwing sink is isolated — it does not prevent the others from receiving the record.
MuteDurationSheet
Bottom sheet that asks the user how long to mute a chat (8 hours / 1 week / always), mirroring WhatsApp's timed-mute picker.
NativeVideoThumbnailer
Default VideoThumbnailer: extracts the first frame through the platform's own decoder (MediaMetadataRetriever on Android, AVAssetImageGenerator on iOS) via the get_thumbnail_video plugin.
NetworkFailure
Network is unreachable or the connection was lost.
NewMessageEvent
NomaChat
Plug & play entry point for Noma Chat.
NomaChatClient
Default ChatClient implementation.
NomaChatView
Complete, drop-in chat-room screen for a single roomId.
NotFoundFailure
Requested resource does not exist (404).
NotParticipatingBanner
Replaces the composer when the local user has been kicked from a group (RoomListItem.isParticipating == false). WhatsApp-style: non-interactive informational copy — the chat above stays fully browsable but the input is gone.
NoVideoThumbnailer
VideoThumbnailer that never produces a frame — the documented way to turn poster frames off (ChatUiAdapter(videoThumbnailer: const NoVideoThumbnailer())). Videos then send exactly as they did before the feature existed: one blob, no preview.
OfflineQueuedMessagesApi
Offline-queue decorator on top of CachedMessagesApi.
OperationError
Single error event broadcast by ChatUiAdapter.operationErrors whenever any adapter method fails. The original ChatResult.ChatFailureResult is still returned to the caller; this stream is for cross-cutting concerns like global snackbars or telemetry.
OperationFeedbackListener
Listens to a Stream<OperationSuccess> (typically chatAdapter.operationSuccesses) and shows localized SnackBars confirming user-visible operations — pin a message, delete a message, forward, etc.
OperationSuccess
Mirror of OperationError for successful operations the consumer might want to confirm to the user (snackbar/toast/etc). Emitted on ChatUiAdapter.operationSuccesses when an operation that has user-visible side effects (pin a message, delete a message, forward, mute a room, report, …) completes successfully.
PendingChatMessage
A locally-persisted outgoing message that has not been confirmed by the server. isFailed is true when the last send attempt returned an error; when false, the message is still pending (in flight or queued).
PinnedMessagesBanner
Banner displayed at the top of a chat view showing the current pinned message.
PlatformSupport
Capability gates for features whose underlying plugins do not cover every target platform. Derived from kIsWeb + defaultTargetPlatform (never dart:io) so it resolves correctly on every platform the SDK builds for, web included. The UI uses these to hide options the platform cannot honour instead of surfacing a control that silently fails.
PollingConfig
Knobs for RealtimeMode.polling. Passed via ChatConfig.pollingConfig (defaults to PollingConfig() when polling is selected without an explicit instance).
PresenceApi
REST implementation of ChatPresenceApi; online state is reported via real-time events, this API only handles polled snapshots and the current user's status update.
PresenceChangedEvent
ProfileSettingsPage
WhatsApp-style "My profile" page: large avatar at the top with edit-on-tap (commits immediately) and a batch-edit form for display name + optional bio/email that surfaces a Save action in the AppBar. The Save button stays disabled until at least one tracked field has pending changes and re-disables itself while the request is in flight.
QuickRepliesBar
Horizontal row of one-tap reply chips above the composer.
RateLimitFailure
Too many requests (429). Check retryAfter for the suggested wait time. errorToken defaults to ChatErrorTokens.rateLimited; the server may override it with a more specific token.
ReactionAddedEvent
ReactionBar
Horizontal pill bar showing per-emoji counts under a message bubble.
ReactionDeletedEvent
ReactionDetailContent
Content of the reaction detail sheet (tabs per emoji + user list). Public so consumers can embed it inside their own bottom sheet wrapper via ReactionDetailSheet.show's sheetBuilder parameter.
ReactionDetailSheet
Bottom sheet that lists every user who reacted to a message, grouped by emoji. Use the static show entry point.
ReactionPicker
Row of selectable emoji used to add a reaction to a message.
ReactionUser
Lightweight user model for reaction detail display.
ReadReceipt
A per-user receipt row for a room: the read cursor (lastReadMessageId / lastReadAt) plus the delivered cursor (lastDeliveredMessageId / lastDeliveredAt). Either side may be null when the user never confirmed that state. Every message at-or-before a cursor's message in conversation order is covered by it; read implies delivered.
ReadReceiptAvatars
Displays a row of small user avatars representing who has read a message.
ReceiptUpdatedEvent
ReplyPreview
Compact preview of the message being replied to. Shown inside reply bubbles and above the composer while drafting a reply.
ReportMessageDialog
WhatsApp-style "report message" dialog: a single free-text reason field with a Cancel / Report action pair.
RestMessagesApi
REST-only implementation of ChatMessagesApi. The plain network layer with no cache integration and no offline queue — both live in dedicated decorators (CachedMessagesApi, OfflineQueuedMessagesApi) so each concern stays cohesive and independently testable.
RetainedUpload
The file behind a failed outgoing media row, kept so a retry can put the same bytes back on the wire.
RoomConfig
Room-level configuration flags.
RoomContextMenu
Long-press context menu for a room: returns the selected RoomAction (or null if dismissed).
RoomCreatedEvent
RoomDefaults
Sensible defaults for room creation / membership flows and UX timing.
RoomDeletedEvent
RoomDetail
Detailed room information including the current user's role and room configuration.
RoomHydrationStatus
Immutable snapshot of the cache phase of RoomEnricher.loadAll, published on RoomEnricher.hydrationNotifier as soon as that phase has written to the room list — before any network pass runs.
RoomListController
Manages the list of rooms displayed in RoomListView.
RoomListHeader
Title bar at the top of RoomListView with optional selection mode UI and trailing action slot.
RoomListItem
View model for a row in the room list, combining server-side room metadata with client-side state (unread, presence, typing, etc.).
RoomListView
Displays a filterable, selectable list of chat rooms with header, search bar, pull-to-refresh, and context menu support.
RoomPreferences
The current user's private preferences for a room: notification mute, pin-to-top, and hide-from-list.
RoomsApi
REST implementation of ChatRoomsApi with optional cache pass-through.
RoomSearchBar
Debounced text field used to filter the room list by name.
RoomTile
A single row in the room list showing avatar, name, last message preview, timestamp, unread badge, and muted/pinned indicators.
RoomTitleContext
Snapshot of the data the SDK has about a room when it needs to pick a title. Passed to RoomTitleResolver so consumers can build app-specific naming.
RoomUpdatedEvent
RoomUser
A member of a room with their assigned role.
ScheduledMessage
A message scheduled to be sent at a future time.
ScrollToBottomButton
Floating action button that appears when the user scrolls up in the message list, optionally showing an unread badge.
SendMessageRequest
Payload describing a send action initiated from the composer.
ServerFailure
Server returned a 5xx error (and the catch-all for unmapped HTTP status codes). Carries the stable errorToken when the backend attached one.
A single shared link with its origin metadata.
SignedAttachmentUrlResolver
Default AttachmentUrlResolver: caches a signed URL per (roomId, attachmentId) alongside its expiry, and re-mints via ChatAttachmentsApi.signedUrl when the cached entry is within safetyMargin of expiring (or has none yet). Falls back to AttachmentRef.fallbackUrl when AttachmentRef.attachmentId is null — first trying to recover an id out of the URL via attachmentIdFromUrl so legacy messages still benefit from re-minting once an id can be derived.
StableUserId
Persists a stable opaque id per typed display name.
StarredMessage
A lightweight reference to a message the current user has starred (a private, per-user bookmark). Returned by ChatMessagesApi.listStarred across all rooms, most recent first.
StarredMessagesPage
WhatsApp-style "Starred messages" page: the current user's bookmarked messages across every room, most recent first.
StarredMessagesView
WhatsApp-style "Starred messages" list: the current user's bookmarked messages across every room, most recent first.
StorageFailure
Avatar/image-storage backend failure (custom AvatarStorage implementations or the default attachment-backed one). Keep cause populated when possible so the host app can decide whether to retry, log, or surface a localized error.
SuggestedContact
Lightweight projection of a user shown in ContactSuggestionsBar — just enough to render an avatar with name and presence dot.
SuggestionBarController
Drives the "suggestion bar" surface (chips above the chat list of users the local user is likely to message). Merges two discovery sources:
SwipeToReply
Wraps a bubble so a short horizontal swipe triggers onSwipe, used to start a reply via gesture instead of the context menu.
SystemMessageMetadataKeys
Keys the SDK writes on a membership system message so its text can be rebuilt when it is painted, in whatever language is current then.
TextBubble
Bubble that renders a plain or markdown-inlined text message with the sender label, timestamp and receipt status.
ThreadView
Displays a message thread: the parent message, its replies, and an input for new replies.
TimeoutFailure
The operation exceeded the configured timeout.
TypingIndicator
Animated three-dot bubble shown when one or more other users are typing.
TypingStatusText
Displays a localized "X is typing..." label based on ChatController.typingUserIds.
UnexpectedFailure
An unexpected error that doesn't fit other failure types. Check originalError for the root cause.
UnreadBadge
Small numeric badge clamped to maxCount (shown as 99+ past the cap). Used in room tiles and the scroll-to-bottom button.
UnreadDivider
WhatsApp-style "N new messages" divider rendered above the first unread message when a chat is opened with pending messages.
UnreadRoom
A room with its unread count and last message preview.
UnreadUpdatedEvent
UploadCancelToken
Cancellation handle for an in-flight ChatAttachmentsApi.upload.
UrlDetector
UserActivityEvent
UserAvatar
Circular user avatar with initials fallback and optional online/presence indicator dot.
UserConfiguration
User-level configuration including webhook settings and custom metadata.
UserInfoPage
Read-only WhatsApp-style "User info" page for a peer in a DM. Shows the large avatar, display name and bio when present. Loaded by userId through the adapter's user cache + REST fallback.
UserJoinedEvent
UserLeftEvent
UserProfileView
Profile sheet for a single user: avatar, display name, presence and quick actions (DM, mute, block) supplied by the host app.
UserRoleChangedEvent
UserRooms
The current user's rooms and pending invitations.
UsersApi
REST implementation of ChatUsersApi with optional cache pass-through.
UserUpdatedEvent
ValidationFailure
Request parameters are invalid (400). Check errors for field-level details.
VideoBubble
Bubble that renders a video thumbnail; tap the play overlay to open.
VideoThumbnailData
A poster frame extracted from a video, ready to be uploaded as its own attachment and rendered by VideoBubble.
VideoThumbnailer
Produces the poster frame a video message displays before playback.
VoiceGestureThresholds
Tunables of the voice recorder gesture inside the composer.
VoiceMessageData
Output of VoiceRecordingController when a recording is finalised: raw audio bytes, duration, downsampled waveform and MIME type, ready to hand to sendVoiceMessage.
VoiceRecorderButton
Visual mic button for chat composers. Recording itself is owned by the composer (see MessageInput), which starts recording as soon as the finger touches this button and delivers the resulting VoiceMessageData via its onVoiceMessageReady callback. This widget is purely a circular mic icon with semantics.
VoiceRecorderOverlay
Full-width overlay rendered above the composer while recording or previewing a voice message; bound to a VoiceRecordingController.
VoiceRecordingController
Drives the voice-message recorder UI: permission flow, recording state, amplitude sampling for the waveform, and pre-listen playback.
WaveformDisplay
Static waveform painter: bars from a list of amplitude samples with a progress indicator. Used in audio bubbles and the recorder preview.
WebhookConfig
Webhook configuration for server-to-server notifications.
XFile
A CrossFile is a cross-platform, simplified File abstraction.

Enums

AttachmentPolicyViolationKind
Categorical reasons for an attachment policy rejection.
AttachmentRejectReason
Categorical reason an AttachmentPickers call rejected a pick.
AvatarKind
Identifies the kind of avatar being uploaded so backends that want to segment storage (e.g. /avatars/users/<id>.jpg vs /avatars/rooms/<id>.jpg) can route accordingly. Pure metadata — the default storage ignores it.
BlockedContentPolicy
What a room does with the messages of a sender the local user has blocked (ChatViewBehaviors.blockedSenderIds).
CachePolicy
Determines how reads are resolved between network and local cache.
ChatActivity
Typing indicator activity sent to a room or DM.
ChatConnectionState
The state of the real-time connection.
ChatCursorDirection
Direction for bidirectional cursor pagination.
ChatErrorType
Classification of a ChatError. Use it to decide whether to retry, surface a validation message, or treat the error as opaque.
ChatLogLevel
Severity of a ChatLogRecord. Ordered debug < info < warn < error; ChatLogger compares a record's level against its configured minimum with operator >=.
ChatLogTag
Subsystem a ChatLogRecord originates from. Lets a sink (or a filtered BufferChatLogSink.export) narrow down to just the area under investigation instead of the whole firehose.
ChatPauseAction
What ChatUiAdapter does to the realtime connection when the host app goes to the background, under ChatLifecyclePolicy.onPause.
ChatSortOrder
Ordering hint for paginated queries. Most message and room listings use desc (newest first) by default.
GroupReceiptPolicy
Who a group message has to reach before its bubble leaves the single grey check. Only the grey ✓✓ is governed by this — the blue one always means every member of the room read the message.
MarkdownStyle
Inline markdown roles recognised by parseMarkdown.
MediaItemType
Kind of media listed in the gallery.
MessageAction
Actions available in the long-press menu of a message. The host app filters this set via ChatView.contextMenuActions.
MessageDeliveryState
Visual delivery state of an outgoing message — the five WhatsApp-style states the SDK renders. Derived from ReceiptStatus plus the local pending/failed flags; feeds MessageStatusIconBuilder.
MessageReceiptKind
Which cursor of a ReadReceipt puts a member on a MessageInfoSheet list: the read cursor ("Read by") or the delivered one ("Delivered to").
MessageType
Discriminator for a ChatMessage's payload. Bubbles in the UI components branch on this value to pick the right renderer.
MimeKind
Broad payload kinds the SDK distinguishes when previewing or grouping attachments. Resolved from the MIME type — see classifyMime.
MuteDuration
WhatsApp-style mute durations offered by MuteDurationSheet.
OperationFeedbackCoverage
How much of the operation feedback an OperationFeedbackListener mounted above a given context already delivers. A widget below it — NomaChatView — reads it through OperationFeedbackListener.coverageAbove and mounts exactly the part nobody is showing yet, rather than inferring from the mere presence of a listener.
OperationKind
Identifies which adapter operation produced an OperationError. Hosts typically branch on this in their snackbar/toast logic.
PresenceStatus
Per-user presence states reported by the backend. The UI components only distinguishes online (any non-offline) vs offline; the granular states are exposed for apps that want to render them.
RealtimeMode
How the SDK should establish its real-time channel against the backend. Selected via ChatConfig.realtimeMode.
ReceiptStatus
Delivery state of an outgoing message as reported by the backend. Read receipts can advance from sent to delivered to read.
RoomAction
Actions available in the long-press menu of a room tile.
RoomAudience
Who can discover and join a room.
RoomHydrationOutcome
What the cache (disk) phase of a room load was able to say, so a host can pick between "loading", "genuinely empty" and "has content" without guessing from list contents or from listener timing.
RoomMemberExpand
Optional resource expansions for ChatMembersApi.list.
RoomRole
Room-level role. The backend wire format uses "user" for member.
RoomType
Conversation shape. oneToOne rooms hold exactly two users and never promote to a group; announcement rooms are read-only for non-admins.
RoomUserMode
Behavior for ChatMembersApi.invite: invite without joining, accept / decline a pending invitation, or invite-and-join atomically.
ServiceStatus
Outcome of a backend health check. degraded means the server responded but some sub-systems are unhealthy.
StartRecordingResult
Result of VoiceRecordingController.startRecording.
TimeoutKind
Which phase of a request timed out. Lets callers decide whether a failed mutation is safe to retry: connection and send are pre-response (the request never reached the server, so re-sending a non-idempotent op is safe), whereas receive means the request was already sent and the server may have processed it (re-sending risks a duplicate). unknown is the defensive default when the phase is not available.
UserRole
Global privilege level a user holds in the chat backend.
VoiceRecordingState
Finite state machine of the voice recorder.
WebhookAuthType
Authentication scheme expected by an outgoing webhook target.

Extensions

AggregatedReactionPatterns on AggregatedReaction
Adds pattern-matching-related methods to AggregatedReaction.
AttachmentSignedUrlPatterns on AttachmentSignedUrl
Adds pattern-matching-related methods to AttachmentSignedUrl.
AttachmentUploadResultPatterns on AttachmentUploadResult
Adds pattern-matching-related methods to AttachmentUploadResult.
BulkPresenceResponsePatterns on BulkPresenceResponse
Adds pattern-matching-related methods to BulkPresenceResponse.
ChatAnalyticsEventPatterns on ChatAnalyticsEvent
Adds pattern-matching-related methods to ChatAnalyticsEvent.
ChatBubbleThemePatterns on ChatBubbleTheme
Adds pattern-matching-related methods to ChatBubbleTheme.
ChatContactPatterns on ChatContact
Adds pattern-matching-related methods to ChatContact.
ChatInputThemePatterns on ChatInputTheme
Adds pattern-matching-related methods to ChatInputTheme.
ChatMarkdownThemePatterns on ChatMarkdownTheme
Adds pattern-matching-related methods to ChatMarkdownTheme.
ChatMessagePatterns on ChatMessage
Adds pattern-matching-related methods to ChatMessage.
ChatPresencePatterns on ChatPresence
Adds pattern-matching-related methods to ChatPresence.
ChatResultFutureX on Future<ChatResult<T>>
Async ergonomics for Future<ChatResult<T>>, so transforms read left to right without an intermediate await or .then.
ChatRoomListThemePatterns on ChatRoomListTheme
Adds pattern-matching-related methods to ChatRoomListTheme.
ChatRoomPatterns on ChatRoom
Adds pattern-matching-related methods to ChatRoom.
ChatThemeL10n on ChatTheme
Resolves the ChatUiLocalizations a widget must render with.
ChatThemePatterns on ChatTheme
Adds pattern-matching-related methods to ChatTheme.
ChatUserPatterns on ChatUser
Adds pattern-matching-related methods to ChatUser.
DiscoveredRoomPatterns on DiscoveredRoom
Adds pattern-matching-related methods to DiscoveredRoom.
ForwardInfoPatterns on ForwardInfo
Adds pattern-matching-related methods to ForwardInfo.
HealthStatusPatterns on HealthStatus
Adds pattern-matching-related methods to HealthStatus.
InvitedRoomPatterns on InvitedRoom
Adds pattern-matching-related methods to InvitedRoom.
MessagePinPatterns on MessagePin
Adds pattern-matching-related methods to MessagePin.
MessageReportPatterns on MessageReport
Adds pattern-matching-related methods to MessageReport.
PendingChatMessagePatterns on PendingChatMessage
Adds pattern-matching-related methods to PendingChatMessage.
ReadReceiptPatterns on ReadReceipt
Adds pattern-matching-related methods to ReadReceipt.
RoomConfigPatterns on RoomConfig
Adds pattern-matching-related methods to RoomConfig.
RoomDetailPatterns on RoomDetail
Adds pattern-matching-related methods to RoomDetail.
RoomListItemPatterns on RoomListItem
Adds pattern-matching-related methods to RoomListItem.
RoomPreferencesPatterns on RoomPreferences
Adds pattern-matching-related methods to RoomPreferences.
RoomUserPatterns on RoomUser
Adds pattern-matching-related methods to RoomUser.
ScheduledMessagePatterns on ScheduledMessage
Adds pattern-matching-related methods to ScheduledMessage.
UnreadRoomPatterns on UnreadRoom
Adds pattern-matching-related methods to UnreadRoom.
UserConfigurationPatterns on UserConfiguration
Adds pattern-matching-related methods to UserConfiguration.
UserRoomsPatterns on UserRooms
Adds pattern-matching-related methods to UserRooms.
WebhookConfigPatterns on WebhookConfig
Adds pattern-matching-related methods to WebhookConfig.

Functions

attachmentIdFromUrl(String url) String?
Extracts an attachment id from a raw attachment slot URL. Recognizes both the signed-url shape .../attachments/{id} (or .../attachments/{id}/...) and the raw upload-backend shape .../media/{id} the SDK persists as ChatMessage.attachmentUrl right after upload (the id is the last path segment in both cases). Returns null when the URL doesn't match either shape (e.g. an arbitrary external URL with no recognizable segment).
attachmentSemanticsId(MediaItem item) String
Stable suffix identifying item inside the gallery's instrumentation ids: the attachment id when the backend sent one, otherwise the url + sender + timestamp triple these rows have always been kept apart by. Shared by the grid cells of MediaGalleryView and the rows of DocsListView so the same attachment answers to the same suffix on both tabs.
buildLastMessagePreview(RoomListItem item, ChatUiLocalizations l10n, {String? currentUserId}) String?
Builds a WhatsApp-style preview text for the last message of a room.
buildMessagesApi({required RestClient rest, TransportManager? transport, ChatLocalDatasource? cache, CacheManager? cacheManager, OfflineQueue? offlineQueue, void logger(String level, String message)?}) ChatMessagesApi
Builds the right ChatMessagesApi chain for the supplied dependencies.
classifyMime(String? mime) MimeKind
Classifies a MIME type string into one of MimeKind. Centralised so MessageList previews, the room-list last-message preview and the media gallery all use the same buckets instead of re-implementing startsWith('image/') checks at each call site.
deliveredTo(ChatMessage message, List<ReadReceipt> receipts) List<String>
Returns the ids of users (from receipts) the message has been delivered to but who have NOT yet read it.
deliveryStatusLegendSemanticsId(MessageDeliveryState state) String
Instrumentation name of the legend row for state.
demoContactsFromEnvironment() List<String>
Reads DEMO_CONTACTS (comma-separated) from compile-time dart-defines. Returns the trimmed, non-empty entries. Empty list when the env var is missing — the suggestion bar then surfaces only roster contacts.
docRowSemanticsId(MediaItem item) String
Instrumentation id of the row rendering item in DocsListView. Built on attachmentSemanticsId, so it carries exactly the identity the tile's reconciliation key already carried.
formatVoiceDuration(int durationMs) String
Formats durationMs as m:ss (e.g. 0:14, 1:23, 12:05).
initialsOf(String? name, {int maxChars = 2}) String
Returns up to maxChars initial letters of name. Uses Unicode-aware character iteration (via String.characters) so multi-code-unit graphemes (emoji, combining marks) stay intact.
linkRowSemanticsId(SharedLink link) String
Instrumentation id of the row rendering link in LinksListView. Carries exactly the url + timestamp identity the tile's reconciliation key already carried.
localizedSystemMessageText(ChatMessage message, ChatUiLocalizations l10n) String?
Rebuilds the banner text of a membership system message in l10n, from the metadata the SDK persisted with it.
localizedSystemMessageTextFromMetadata(Map<String, dynamic>? metadata, ChatUiLocalizations l10n) String?
localizedSystemMessageText over a raw metadata map — used by the adapter, which builds the map before it has a ChatMessage to put it on, so both the persisted text and every later repaint come out of this one switch.
mediaCellSemanticsId(MediaItem item) String
Instrumentation id of the grid cell rendering item in MediaGalleryView.
mediaSemanticLabel(ChatMessage m, ChatUiLocalizations l10n) String?
What a screen reader should read as the body of a message that is not plain text — a photo, a video, a voice note, a shared location, a document, a forward.
messageBubbleSemanticsId(String messageId, {required bool isOutgoing}) String
Instrumentation name of the bubble rendering messageId, published as the row's ValueKey in MessageList and as the bubble's Semantics(identifier:) here — one helper so the two halves cannot drift.
messageStatusSemanticsId(String messageId) String
Instrumentation name of the delivery tick belonging to messageId, so a driver can point at the tick of one specific message instead of at "some check somewhere".
parseMarkdown(String text, {required TextStyle baseStyle, TextStyle? boldStyle, TextStyle? italicStyle, TextStyle? codeStyle, TextStyle? strikethroughStyle, TextStyle? linkStyle, TextStyle? mentionStyle, ValueChanged<String>? onTapLink, ValueChanged<String>? onTapMention}) List<TextSpan>
Splits text into styled TextSpans according to MarkdownStyle.
previewForMessage(ChatMessage m, ChatUiLocalizations l10n) String
WhatsApp-style preview for a single ChatMessage (used by the starred list). Returns the text verbatim for text messages and a sensible label for non-text (Photo / Voice / document name / Location / Forwarded), so the starred screen reads the same way the room list does. Never blank.
readersFor(ChatMessage message, List<ReadReceipt> receipts) List<String>
Returns the ids of users (from receipts) who have read message.
resolveUnreadBoundary({required List<ChatMessage> messages, required String currentUserId, required int fallbackUnreadCount, ReadReceipt? ownReadCursor}) → ({int count, String messageId})?
The row the "N new messages" line belongs above, plus how many messages it stands for. null when there is nothing to draw a line for.
searchResultSemanticsId(String messageId) String
Instrumentation id of the MessageSearchView row for the message with id messageId.
showChatNotice(BuildContext context, String message, {SnackBar snackBarBuilder(BuildContext context, String message)?}) → void
Shows message as a short notice: through the host's ChatNoticeScope when there is one, otherwise as a SnackBar on the nearest ScaffoldMessenger.
starredRowSemanticsId(String messageId) String
Instrumentation id of the StarredMessagesView row bookmarking the message with id messageId.
starredUnstarSemanticsId(String messageId) String
Instrumentation id of the trailing unstar toggle on the StarredMessagesView row for messageId.
videoFileExtensionFor(String mimeType) String
File extension (leading dot) the spooled copy of a video/* payload should carry.

Typedefs

AttachmentUrlResolver = Future<String> Function(AttachmentRef ref)
Resolves the URL a bubble should load bytes from for an attachment message, given its stable id. Implementations typically re-mint a short-lived signed URL on demand rather than trusting a persisted one that may have expired — see SignedAttachmentUrlResolver, the default implementation the adapter wires into NomaChatView/ChatView.
BatchUserFetcher = Future<Map<String, ReactionUser>> Function(Set<String> userIds)
Callback that resolves multiple user IDs into display information in a single call. Prefer this over UserFetcher when the host app can batch the lookup (e.g. one HTTP request for N ids) — ReactionDetailContent uses it, when provided, instead of invoking UserFetcher once per unique reactor. IDs missing from the returned map fall back to a ReactionUser with displayName == id, same as a failed UserFetcher call.
CameraVideoPreviewBuilder = Widget Function(BuildContext context, XFile file, ChatTheme theme)
Builds the playable preview for a clip waiting on the review step.
ChatAnalyticsSink = void Function(ChatAnalyticsEvent event)
Sink for ChatAnalyticsEvents: room opens, incoming messages, voice-note plays, and the outcome of a send. Wire it through ChatConfig .analyticsSink or directly into ChatUiAdapter's constructor — the latter is required for hosts that build ChatUiAdapter by hand instead of going through NomaChat.create/fromConfig, since a callback that only lived on ChatConfig would never reach them.
ChatAppBarBuilder = PreferredSizeWidget Function(BuildContext context, RoomListItem? room, ChatController controller)
Signature for NomaChatView.appBarBuilder — builds the screen's app bar from the live room (may be null before the room list resolves it) and the bound controller. Return any PreferredSizeWidget (typically an AppBar or the SDK's ChatRoomAppBar).
ChatNoticePresenter = bool Function(BuildContext context, String message)
Presents a package notice the host's own way — a top banner, a toast of its own design system, an analytics hop, anything.
ContextMenuActionsResolver = Set<MessageAction> Function(RoomListItem? room, Set<MessageAction> defaults)
Signature for NomaChatView.contextMenuActionsResolver — given the live room (may be null) and the SDK's default action set, returns the final set of MessageActions offered in the bubble long-press menu. Use it to add or remove actions on top of the role-aware defaults.
DeliveryStatusLegendEntryBuilder = Widget? Function(BuildContext context, DeliveryStatusLegendEntry entry)
Replaces a legend row. Return null to keep the SDK default for that row (same contract as ChatViewBuilders.systemMessageBuilder).
EmptyRoomBuilder = Widget? Function(BuildContext context, EmptyRoomInfo room)
Builds the card shown in a room with no messages. Return null to let the SDK draw its own (EmptyRoomState).
IsDmRoomPredicate = bool Function(RoomDetail detail)
Predicate the adapter uses to decide whether a room is a DM and therefore should be tracked in the contact-to-room cache. When null, falls back to detail.type == RoomType.oneToOne.
ManagedUserConfiguration = UserConfiguration
MessageForwardConfirmBuilder = Widget Function(BuildContext context, List<String> selectedIds, VoidCallback onConfirm)
Signature for the confirm-button builder. Lets the consumer style or replace the default "Forward" button (e.g. swap to a FilledButton, add a count badge, render as a FAB, etc.).
MessageForwardEmptyCallback = void Function(BuildContext context)
Signature for the "no chats available" handler used by MessageForwardSheet.show BEFORE the modal opens. Fires when the caller's room list is empty — the consumer can navigate to a "New chat" page, show a dialog, etc. instead of the default snackbar.
MessageForwardRowBuilder = Widget Function(BuildContext context, RoomListItem room, bool isSelected, ValueChanged<bool> onToggle)
Signature for a per-row builder. Lets the consumer fully replace the default CheckboxListTile + avatar row with a custom widget.
MessageReceiptSubtitleBuilder = Widget? Function(BuildContext context, MessageReceiptDetail detail)
Replaces the subtitle of a MessageInfoSheet member row. Return null to fall back to the SDK default for that row (same contract as ChatViewBuilders.systemMessageBuilder).
MessageReceiptTimeFormatter = String Function(BuildContext context, DateTime at)
Formats a receipt timestamp for a MessageInfoSheet row.
MessageStatusIconBuilder = Widget? Function(BuildContext context, MessageStatusIconData data)
Override for the delivery-status icon. Return null to fall back to the SDK default rendering for that state (same contract as ChatViewBuilders.systemMessageBuilder).
OperationErrorLabelBuilder = String? Function(BuildContext context, OperationError event, ChatTheme theme)
Localized message for a failed operation. Returning null (or an empty string) suppresses the snackbar — the default only speaks up for expected failures the bubble cannot express on its own (a content-filter rejection, and a retry refused because the row's file never got uploaded) and stays silent for everything else, so transient/network errors keep surfacing as failed-message bubbles rather than noisy toasts.
OperationSuccessLabelBuilder = String? Function(BuildContext context, OperationSuccess event, ChatTheme theme)
Localized message for a successful operation. Returning null (or an empty string) suppresses the snackbar for that event — consumers use this to opt out per-kind without disabling the listener.
ReactionDetailSheetBuilder = Future<void> Function(BuildContext context, Widget content)
Signature for a custom presenter of the reaction detail sheet. Receives the already-built content widget and is responsible for displaying it in the host app's preferred bottom sheet style. When null, ReactionDetailSheet falls back to a vanilla showModalBottomSheet.
RoomTitleResolver = String? Function(RoomTitleContext context)
Resolves the title shown for a room across the SDK (surfaced via RoomListItem.displayName and any consumer reading it). Returning null opts out and lets the SDK apply its default: for DMs the other member's displayName (falling back to their id); for groups the server-provided room.name. Use this hook to inject app-specific naming (e.g. nickname books, role-based titles) without forking the SDK or mutating room state.
UserFetcher = Future<ReactionUser> Function(String userId)
Callback that resolves a user ID into display information.
VoiceRecordingControllerFactory = VoiceRecordingController Function(Duration maxDuration)
Factory used by MessageInputVoiceController to build the underlying VoiceRecordingController. Replaceable in tests.

Exceptions / Errors

AvatarStorageException
Thrown by AvatarStorage implementations to signal upload/delete failures. The SDK surfaces it as a StorageFailure so UI layers can render a localized error message without inspecting the cause.