flutter_chat_ui library

Flutter Chat UI package. Provides the UI for the Flyer Chat.

Classes

Avatar
A widget that displays a user's avatar.
AvatarContent
Internal widget responsible for rendering the actual avatar content (image, initials, or icon) based on the resolved User data.
Chat
The main widget that orchestrates the chat UI.
ChatAnimatedList
An animated list widget specifically designed for displaying chat messages.
ChatAnimatedListReversed
An animated list widget specifically designed for displaying chat messages, growing from bottom to top (reversed).
ChatMessage
Default wrapper widget for a single chat message item.
Composer
The message composer widget positioned at the bottom of the chat screen.
ComposerHeightNotifier
A ChangeNotifier used to track the height of the message composer.
EmptyChatList
A widget to display when the chat list is empty.
IsTypingIndicator
An animated indicator showing three dots bouncing, typically used to show that another user is typing.
LoadMore
A widget displayed at the top of the chat list when paginating (loading more historical messages).
LoadMoreNotifier
A ChangeNotifier used to track the height and loading state of the "Load More" indicator widget.
ScrollToBottom
A floating action button typically displayed near the composer that scrolls the chat list to the bottom when pressed.
SimpleTextMessage
A widget that displays a simple text message.
TimeAndStatus
A widget to display the message timestamp and status indicator.
Username
A widget that displays a user's name.

Enums

InitialScrollToEndMode
Enum controlling the initial scroll behavior of the chat list.
SendButtonVisibilityMode
Enum to control the visibility of the send button.

Typedefs

MessageAnimationDurationResolver = Duration? Function(Message message)
Signature for a function that resolves the animation duration for a specific message. Used for customizing insert/remove animations in the chat list.
OnAttachmentTapCallback = VoidCallback
Callback signature for when the attachment button in the composer is tapped.
OnMessageDoubleTapCallback = void Function(BuildContext context, Message message, {int index})
Callback signature for when a message is double tapped. context is the BuildContext from the widget tree where the tap occurs. Provides the tapped message, its index
OnMessageLongPressCallback = void Function(BuildContext context, Message message, {LongPressStartDetails details, int index})
Callback signature for when a message is long-pressed. context is the BuildContext from the widget tree where the long press occurs. Provides the long-pressed message, its index, and LongPressStartDetails.
OnMessageSendCallback = void Function(String text)
Callback signature for when the user attempts to send a message. Provides the text entered by the user.
OnMessageTapCallback = void Function(BuildContext context, Message message, {TapUpDetails details, int index})
Callback signature for when a message is tapped. context is the BuildContext from the widget tree where the tap occurs. Provides the tapped message, its index, and TapUpDetails.
PaginationCallback = Future<void> Function()
Callback signature for requesting pagination (loading more messages). Should return a Future that completes when the loading is finished.