ChatTheme class abstract
Base chat theme containing all required variables to make a theme. Extend this class if you want to create a custom theme.
- Implementers
- Annotations
Constructors
-
ChatTheme({required Widget? attachmentButtonIcon, required Color backgroundColor, required TextStyle dateDividerTextStyle, required Widget? deliveredIcon, required Widget? documentIcon, required TextStyle emptyChatPlaceholderTextStyle, required Color errorColor, required Widget? errorIcon, required Color inputBackgroundColor, required BorderRadius inputBorderRadius, required TextStyle inputTextStyle, required Color inputTextColor, required double messageBorderRadius, required Color primaryColor, required TextStyle receivedMessageBodyTextStyle, required TextStyle receivedMessageCaptionTextStyle, required Color receivedMessageDocumentIconColor, required TextStyle receivedMessageLinkDescriptionTextStyle, required TextStyle receivedMessageLinkTitleTextStyle, required Color secondaryColor, required Widget? seenIcon, required Widget? sendButtonIcon, required TextStyle sentMessageBodyTextStyle, required TextStyle sentMessageCaptionTextStyle, required Color sentMessageDocumentIconColor, required TextStyle sentMessageLinkDescriptionTextStyle, required TextStyle sentMessageLinkTitleTextStyle, required List<
Color> userAvatarNameColors, required TextStyle userAvatarTextStyle, required TextStyle userNameTextStyle}) -
Creates a new chat theme based on provided colors and text styles.
const
Properties
- attachmentButtonIcon → Widget?
-
Icon for select attachment button
final
- backgroundColor → Color
-
Used as a background color of a chat widget
final
- dateDividerTextStyle → TextStyle
-
Text style of the date dividers
final
- deliveredIcon → Widget?
-
Icon for message's
delivered
status. For the best look use size of 16.final - documentIcon → Widget?
-
Icon inside file message
final
- emptyChatPlaceholderTextStyle → TextStyle
-
Text style of the empty chat placeholder
final
- errorColor → Color
-
Color to indicate something bad happened (usually - shades of red)
final
- errorIcon → Widget?
-
Icon for message's
error
status. For the best look use size of 16.final - hashCode → int
-
The hash code for this object.
no setterinherited
- inputBackgroundColor → Color
-
Color of the bottom bar where text field is
final
- inputBorderRadius → BorderRadius
-
Top border radius of the bottom bar where text field is
final
- inputTextColor → Color
-
Color of the text field's text and attachment/send buttons
final
- inputTextStyle → TextStyle
-
Text style of the message input. To change the color use inputTextColor.
final
- messageBorderRadius → double
-
Border radius of message container
final
- primaryColor → Color
-
Primary color of the chat used as a background of sent messages
and statuses
final
- receivedMessageBodyTextStyle → TextStyle
-
Body text style used for displaying text on different types
of received messages
final
- receivedMessageCaptionTextStyle → TextStyle
-
Caption text style used for displaying secondary info (e.g. file size)
on different types of received messages
final
- receivedMessageDocumentIconColor → Color
-
Color of the document icon on received messages. Has no effect when
documentIcon is used.
final
- receivedMessageLinkDescriptionTextStyle → TextStyle
-
Text style used for displaying link description on received messages
final
- receivedMessageLinkTitleTextStyle → TextStyle
-
Text style used for displaying link title on received messages
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondaryColor → Color
-
Secondary color, used as a background of received messages
final
- seenIcon → Widget?
-
Icon for message's
seen
status. For the best look use size of 16.final - sendButtonIcon → Widget?
-
Icon for send button
final
- sentMessageBodyTextStyle → TextStyle
-
Body text style used for displaying text on different types
of sent messages
final
- sentMessageCaptionTextStyle → TextStyle
-
Caption text style used for displaying secondary info (e.g. file size)
on different types of sent messages
final
- sentMessageDocumentIconColor → Color
-
Color of the document icon on sent messages. Has no effect when
documentIcon is used.
final
- sentMessageLinkDescriptionTextStyle → TextStyle
-
Text style used for displaying link description on sent messages
final
- sentMessageLinkTitleTextStyle → TextStyle
-
Text style used for displaying link title on sent messages
final
-
userAvatarNameColors
→ List<
Color> -
Colors used as backgrounds for user avatars and corresponded user names.
Calculated based on a user ID, so unique across the whole app.
final
- userAvatarTextStyle → TextStyle
-
Text style used for displaying initials on user avatar if no
image is provided
final
- userNameTextStyle → TextStyle
-
User names text style. Color will be overwritten with userAvatarNameColors.
final
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