ChatConfiguration class
Visual and behavioral options for the chat UI.
Passed to Chat.configuration.
Constructors
- ChatConfiguration({ChatAlignment senderAlignment = ChatAlignment.end, Widget newReceiveMessageNotificationBuilder(BuildContext, Message, ChatController)?, BubbleConfiguration bubbleConfiguration = const BubbleConfiguration(), Widget? readOnlyWidget, double newMessageScrollThreshold = 300, Widget dateSeparatorBuilder(BuildContext context, String name)?, TextStyle? dateSeparatorStyle, EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 30), Duration? messageAppearAnimationDuration, bool messagesStartAtTop = false})
-
Creates a ChatConfiguration.
const
Properties
- bubbleConfiguration → BubbleConfiguration
-
Appearance options for bubbles, profiles and timestamps.
final
- dateSeparatorBuilder → Widget Function(BuildContext context, String name)?
-
Builds the separator shown between messages from different days.
final
- dateSeparatorStyle → TextStyle?
-
Text style for the date separator.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPrevProfile → bool
-
Whether sender messages are on the leading side
(senderAlignment is ChatAlignment.start).
no setter
- messageAppearAnimationDuration → Duration?
-
Duration of the entrance animation for newly added messages.
final
- messagesStartAtTop → bool
-
Whether a reversed chat (ChatController.reverse) shows its messages from the top while they
do not fill the screen.
final
- newMessageScrollThreshold → double
-
Distance in logical pixels from the bottom within which the chat
auto-scrolls to a newly received message.
final
- newReceiveMessageNotificationBuilder → Widget Function(BuildContext, Message, ChatController)?
-
Builds a "new message" notification shown at the bottom of the chat
when a receiver message arrives while the user has scrolled up.
final
- padding → EdgeInsets
-
Padding around the message list.
final
- readOnlyWidget → Widget?
-
Widget shown in place of the input field when Chat.readOnly is
true.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- senderAlignment → ChatAlignment
-
Side on which sender messages (SenderMessage) are shown.
final
Methods
-
buildDateDivider(
BuildContext context, String timestamp) → Widget - Builds the date separator with dateSeparatorBuilder or the default one.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited