chat_message_ui_kit library

Classes

AnimatedCircles
Animated Circles Widget.
AttachmentButton
A class that represents attachment button widget.
AvatarHandler
Multi Avatar Handler Widget.
Chat
Entry widget, represents the complete chat. If you wrap it in SafeArea and it should be full screen, set SafeArea's bottom to false.
ChatL10n
Base chat l10n containing all required properties to provide localized copy. Extend this class if you want to create a custom l10n.
ChatL10nAr
Arabic l10n which extends ChatL10n.
ChatL10nDe
German l10n which extends ChatL10n.
ChatL10nEn
English l10n which extends ChatL10n.
ChatL10nEs
Spanish l10n which extends ChatL10n.
ChatL10nFa
Persian l10n which extends ChatL10n.
ChatL10nFi
Finnish l10n which extends ChatL10n.
ChatL10nKo
Korean l10n which extends ChatL10n.
ChatL10nPl
Polish l10n which extends ChatL10n.
ChatL10nPt
Portuguese l10n which extends ChatL10n.
ChatL10nRu
Russian l10n which extends ChatL10n.
ChatL10nSe
Swedish l10n which extends ChatL10n.
ChatL10nTr
Turkish l10n which extends ChatL10n.
ChatL10nUk
Ukrainian l10n which extends ChatL10n.
ChatL10nZhCN
Simplified Chinese l10n which extends ChatL10n.
ChatL10nZhTW
Traditional Chinese l10n which extends ChatL10n.
ChatList
The main scrollable list widget that displays chat messages with animations and pagination. This widget handles the complex logic of animating messages in/out, managing scroll behavior, infinite scrolling for loading more messages, and showing typing indicators.
ChatState
Chat widget state.
ChatTheme
Base chat theme containing all required properties to make a theme. Extend this class if you want to create a custom theme.
Conditional
The abstract class for a conditional import feature.
DefaultChatTheme
Default chat theme which extends ChatTheme. Colors are basic on purpose to encourage changing to match application theme.
ImageGallery
Image gallery widget with automatic memory optimization. This widget now uses OptimizedImageGallery internally for better performance with large image sets while maintaining the same API for backward compatibility.
ImageGalleryOptions
ImageMessage
A class that represents image message widget. Supports different aspect ratios, renders blurred image as a background which is visible if the image is narrow, renders image in form of a file if aspect ratio is very small or very big.
Input
The main input widget for composing and sending messages in the chat. Provides a text field for typing messages, optional attachment button, and a send button. Handles keyboard shortcuts, text validation, and various input behaviors like auto-clear.
InputOptions
Configuration options for customizing Input widget behavior and appearance. Controls text input behavior, keyboard settings, button visibility, and interaction callbacks.
InputTextFieldController
Enhanced text editing controller that provides real-time markdown highlighting in the input field. Extends TextEditingController to add visual formatting for bold, italic, strikethrough, and code patterns while the user types, giving immediate visual feedback for markdown syntax.
LinkPreview
A widget that renders text with highlighted links. Eventually unwraps to the full preview of the first found link if the parsing was successful.
Message
Base widget for all message types in the chat. Renders bubbles around messages and status. Sets maximum width for a message for a nice look on larger screens.
MessageStatus
A class that represents a message status.
ScrollToUnreadOptions
SendButton
A class that represents send button widget.
TextMessage
Widget that renders text messages with support for markdown, link previews, and emoji enlargement. This is the most common message type, handling plain text with advanced formatting capabilities including clickable links, preview cards for URLs, and special handling for emoji-only messages.
TextMessageOptions
Configuration options for text message behavior and appearance. Controls text selection, link handling, preview interactions, and custom text parsing.
TextMessageText
Reusable widget for rendering rich text with markdown support and link detection. This widget parses text for various patterns (links, bold, italic, code) and applies appropriate styling. Used both in regular messages and link previews.
TypingAvatar
TypingIndicator
TypingIndicatorOptions
TypingIndicatorTheme
TypingWidget
Typing Widget.
UnreadHeader
UnreadHeaderTheme
UserAvatar
Renders user's avatar or initials next to a message.
UserName
Renders user's name as a message heading according to the theme.

Enums

BubbleRtlAlignment
Bubble Alignment. Right or Left
EmojiEnlargementBehavior
Used to control the enlargement behavior of the emojis in the TextMessageModel.
InputClearMode
Used to set Input clear mode when message is sent.
SendButtonVisibilityMode
Used to toggle the visibility behavior of the SendButton based on the TextField state inside the Input widget.
TypingIndicatorMode
Used to toggle the display of avatars, names or both on TypingIndicator.

Constants

colors → const List<Color>
See ChatTheme.userAvatarNameColors.

Functions

boldMatcher({TextStyle? style}) → MatchText
codeMatcher({TextStyle? style}) → MatchText
consistsOfEmojis(EmojiEnlargementBehavior emojiEnlargementBehavior, TextMessageModel message) → bool
Determines if a text message contains only emoji characters for enlargement. Uses comprehensive Unicode regex to detect emoji patterns including complex multi-part emojis. Behavior depends on EmojiEnlargementBehavior setting (single vs multiple emoji support).
formatBytes(int size, [int fractionDigits = 2]) → String
Converts byte size to human-readable format with appropriate units (B, kB, MB, GB, etc.). Uses binary calculation (1024-based) for accurate file size representation.
italicMatcher({TextStyle? style}) → MatchText
lineThroughMatcher({TextStyle? style}) → MatchText
mailToMatcher({TextStyle? style}) → MatchText
Function used to check message text for possible email to highlight and hyperlink
urlMatcher({TextStyle? style, dynamic onLinkPressed(String url)?}) → MatchText
Function to check message text for url to hyperlink