DefaultChatTheme class
Default chat theme which extends ChatTheme.
Constructors
-
DefaultChatTheme({Widget? attachmentButtonIcon, EdgeInsets? attachmentButtonMargin, Color backgroundColor = neutral7, EdgeInsets dateDividerMargin = const EdgeInsets.only(bottom: 32, top: 16), TextStyle dateDividerTextStyle = const TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w800, height: 1.333), Widget? deliveredIcon, Widget? documentIcon, TextStyle emptyChatPlaceholderTextStyle = const TextStyle(color: neutral2, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5), Color errorColor = error, Widget? errorIcon, Color inputBackgroundColor = neutral0, BorderRadius inputBorderRadius = const BorderRadius.vertical(top: Radius.circular(20)), Decoration? inputContainerDecoration, EdgeInsets inputMargin = EdgeInsets.zero, EdgeInsets inputPadding = const EdgeInsets.fromLTRB(24, 20, 24, 20), Color inputTextColor = neutral7, Color? inputTextCursorColor, InputDecoration inputTextDecoration = const InputDecoration(border: InputBorder.none, contentPadding: EdgeInsets.zero, isCollapsed: true), TextStyle inputTextStyle = const TextStyle(fontSize: 16, fontWeight: FontWeight.w500, height: 1.5), double messageBorderRadius = 20, double messageInsetsHorizontal = 20, double messageInsetsVertical = 16, Color primaryColor = primary, TextStyle receivedEmojiMessageTextStyle = const TextStyle(fontSize: 40), TextStyle? receivedMessageBodyBoldTextStyle, TextStyle? receivedMessageBodyCodeTextStyle, TextStyle? receivedMessageBodyLinkTextStyle, TextStyle receivedMessageBodyTextStyle = const TextStyle(color: neutral0, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5), TextStyle receivedMessageCaptionTextStyle = const TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333), Color receivedMessageDocumentIconColor = primary, TextStyle receivedMessageLinkDescriptionTextStyle = const TextStyle(color: neutral0, fontSize: 14, fontWeight: FontWeight.w400, height: 1.428), TextStyle receivedMessageLinkTitleTextStyle = const TextStyle(color: neutral0, fontSize: 16, fontWeight: FontWeight.w800, height: 1.375), Color secondaryColor = secondary, Widget? seenIcon, Widget? sendButtonIcon, EdgeInsets? sendButtonMargin, Widget? sendingIcon, TextStyle sentEmojiMessageTextStyle = const TextStyle(fontSize: 40), TextStyle? sentMessageBodyBoldTextStyle, TextStyle? sentMessageBodyCodeTextStyle, TextStyle? sentMessageBodyLinkTextStyle, TextStyle sentMessageBodyTextStyle = const TextStyle(color: neutral7, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5), TextStyle sentMessageCaptionTextStyle = const TextStyle(color: neutral7WithOpacity, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333), Color sentMessageDocumentIconColor = neutral7, TextStyle sentMessageLinkDescriptionTextStyle = const TextStyle(color: neutral7, fontSize: 14, fontWeight: FontWeight.w400, height: 1.428), TextStyle sentMessageLinkTitleTextStyle = const TextStyle(color: neutral7, fontSize: 16, fontWeight: FontWeight.w800, height: 1.375), EdgeInsets statusIconPadding = const EdgeInsets.symmetric(horizontal: 4), SystemMessageTheme systemMessageTheme = const SystemMessageTheme(margin: EdgeInsets.only(bottom: 24, top: 8, left: 8, right: 8), textStyle: TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w800, height: 1.333)), TypingIndicatorTheme typingIndicatorTheme = const TypingIndicatorTheme(animatedCirclesColor: neutral1, animatedCircleSize: 5.0, bubbleBorder: BorderRadius.all(Radius.circular(27.0)), bubbleColor: neutral7, countAvatarColor: primary, countTextColor: secondary, multipleUserTextStyle: TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: neutral2)), UnreadHeaderTheme unreadHeaderTheme = const UnreadHeaderTheme(color: secondary, textStyle: TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333)), Color userAvatarImageBackgroundColor = Colors.transparent, List<
Color> userAvatarNameColors = colors, TextStyle userAvatarTextStyle = const TextStyle(color: neutral7, fontSize: 12, fontWeight: FontWeight.w800, height: 1.333), TextStyle userNameTextStyle = const TextStyle(fontSize: 12, fontWeight: FontWeight.w800, height: 1.333)}) -
Creates a default chat theme. Use this constructor if you want to
override only a couple of properties, otherwise create a new class
which extends ChatTheme.
const
Properties
- attachmentButtonIcon → Widget?
-
Icon for select attachment button.
finalinherited
- attachmentButtonMargin → EdgeInsets?
-
Margin of attachment button.
finalinherited
- backgroundColor → Color
-
Used as a background color of a chat widget.
finalinherited
- dateDividerMargin → EdgeInsets
-
Margin around date dividers.
finalinherited
- dateDividerTextStyle → TextStyle
-
Text style of the date dividers.
finalinherited
- deliveredIcon → Widget?
-
Icon for message's
delivered
status. For the best look use size of 16.finalinherited - documentIcon → Widget?
-
Icon inside file message.
finalinherited
- emptyChatPlaceholderTextStyle → TextStyle
-
Text style of the empty chat placeholder.
finalinherited
- errorColor → Color
-
Color to indicate something bad happened (usually - shades of red).
finalinherited
- errorIcon → Widget?
-
Icon for message's
error
status. For the best look use size of 16.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- inputBackgroundColor → Color
-
Color of the bottom bar where text field is.
finalinherited
- inputBorderRadius → BorderRadius
-
Top border radius of the bottom bar where text field is.
finalinherited
- inputContainerDecoration → Decoration?
-
Decoration of the container wrapping the text field.
finalinherited
- inputMargin → EdgeInsets
-
Outer insets of the bottom bar where text field is.
finalinherited
- inputPadding → EdgeInsets
-
Inner insets of the bottom bar where text field is.
finalinherited
- inputTextColor → Color
-
Color of the text field's text and attachment/send buttons.
finalinherited
- inputTextCursorColor → Color?
-
Color of the text field's cursor.
finalinherited
- inputTextDecoration → InputDecoration
-
Decoration of the input text field.
finalinherited
- inputTextStyle → TextStyle
-
Text style of the message input. To change the color use inputTextColor.
finalinherited
- messageBorderRadius → double
-
Border radius of message container.
finalinherited
- messageInsetsHorizontal → double
-
Horizontal message bubble insets.
finalinherited
- messageInsetsVertical → double
-
Vertical message bubble insets.
finalinherited
- primaryColor → Color
-
Primary color of the chat used as a background of sent messages
and statuses.
finalinherited
- receivedEmojiMessageTextStyle → TextStyle
-
Text style used for displaying emojis on text messages.
finalinherited
- receivedMessageBodyBoldTextStyle → TextStyle?
-
Body text style used for displaying bold text on received text messages.
Default to a bold version of receivedMessageBodyTextStyle.
finalinherited
- receivedMessageBodyCodeTextStyle → TextStyle?
-
Body text style used for displaying code text on received text messages.
Defaults to a mono version of receivedMessageBodyTextStyle.
finalinherited
- receivedMessageBodyLinkTextStyle → TextStyle?
-
Text style used for displaying link text on received text messages.
Defaults to receivedMessageBodyTextStyle.
finalinherited
- receivedMessageBodyTextStyle → TextStyle
-
Body text style used for displaying text on different types
of received messages.
finalinherited
- receivedMessageCaptionTextStyle → TextStyle
-
Caption text style used for displaying secondary info (e.g. file size) on different types of received messages.
finalinherited
- receivedMessageDocumentIconColor → Color
-
Color of the document icon on received messages. Has no effect when
documentIcon is used.
finalinherited
- receivedMessageLinkDescriptionTextStyle → TextStyle
-
Text style used for displaying link description on received messages.
finalinherited
- receivedMessageLinkTitleTextStyle → TextStyle
-
Text style used for displaying link title on received messages.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondaryColor → Color
-
Secondary color, used as a background of received messages.
finalinherited
- seenIcon → Widget?
-
Icon for message's
seen
status. For the best look use size of 16.finalinherited - sendButtonIcon → Widget?
-
Icon for send button.
finalinherited
- sendButtonMargin → EdgeInsets?
-
Margin of send button.
finalinherited
- sendingIcon → Widget?
-
Icon for message's
sending
status. For the best look use size of 10.finalinherited - sentEmojiMessageTextStyle → TextStyle
-
Text style used for displaying emojis on text messages.
finalinherited
- sentMessageBodyBoldTextStyle → TextStyle?
-
Body text style used for displaying bold text on sent text messages.
Defaults to a bold version of sentMessageBodyTextStyle.
finalinherited
- sentMessageBodyCodeTextStyle → TextStyle?
-
Body text style used for displaying code text on sent text messages.
Defaults to a mono version of sentMessageBodyTextStyle.
finalinherited
- sentMessageBodyLinkTextStyle → TextStyle?
-
Text style used for displaying link text on sent text messages.
Defaults to sentMessageBodyTextStyle.
finalinherited
- sentMessageBodyTextStyle → TextStyle
-
Body text style used for displaying text on different types
of sent messages.
finalinherited
- sentMessageCaptionTextStyle → TextStyle
-
Caption text style used for displaying secondary info (e.g. file size) on different types of sent messages.
finalinherited
- sentMessageDocumentIconColor → Color
-
Color of the document icon on sent messages. Has no effect when
documentIcon is used.
finalinherited
- sentMessageLinkDescriptionTextStyle → TextStyle
-
Text style used for displaying link description on sent messages.
finalinherited
- sentMessageLinkTitleTextStyle → TextStyle
-
Text style used for displaying link title on sent messages.
finalinherited
- statusIconPadding → EdgeInsets
-
Padding around status icons.
finalinherited
- systemMessageTheme → SystemMessageTheme
-
Theme for the system message. Will not have an effect if a custom builder
is provided.
finalinherited
- typingIndicatorTheme → TypingIndicatorTheme
-
Theme for typing indicator. See TypingIndicator.
finalinherited
- unreadHeaderTheme → UnreadHeaderTheme
-
Theme for the unread header.
finalinherited
- userAvatarImageBackgroundColor → Color
-
Color used as a background for user avatar if an image is provided.
Visible if the image has some transparent parts.
finalinherited
-
userAvatarNameColors
→ List<
Color> -
Colors used as backgrounds for user avatars with no image and so,
corresponding user names.
Calculated based on a user ID, so unique across the whole app.
finalinherited
- userAvatarTextStyle → TextStyle
-
Text style used for displaying initials on user avatar if no
image is provided.
finalinherited
- userNameTextStyle → TextStyle
-
User names text style. Color will be overwritten with userAvatarNameColors.
finalinherited
Methods
-
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