DefaultChatTheme constructor
const
DefaultChatTheme({
- dynamic attachmentButtonIcon,
- dynamic attachmentButtonMargin,
- dynamic backgroundColor = neutral7,
- dynamic dateDividerMargin = const EdgeInsets.only(bottom: 32, top: 16),
- dynamic dateDividerTextStyle = const TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w800, height: 1.333),
- dynamic deliveredIcon,
- dynamic documentIcon,
- dynamic emptyChatPlaceholderTextStyle = const TextStyle(color: neutral2, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
- dynamic errorColor = error,
- dynamic errorIcon,
- dynamic inputBackgroundColor = neutral0,
- dynamic inputBorderRadius = const BorderRadius.vertical(top: Radius.circular(20)),
- dynamic inputContainerDecoration,
- dynamic inputMargin = EdgeInsets.zero,
- dynamic inputPadding = const EdgeInsets.fromLTRB(24, 20, 24, 20),
- dynamic inputTextColor = neutral7,
- dynamic inputTextCursorColor,
- dynamic inputTextDecoration = const InputDecoration(border: InputBorder.none, contentPadding: EdgeInsets.zero, isCollapsed: true),
- dynamic inputTextStyle = const TextStyle(fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
- dynamic messageBorderRadius = 20.0,
- dynamic messageInsetsHorizontal = 20.0,
- dynamic messageInsetsVertical = 16.0,
- dynamic primaryColor = primary,
- dynamic receivedEmojiMessageTextStyle = const TextStyle(fontSize: 40),
- dynamic receivedMessageBodyBoldTextStyle,
- dynamic receivedMessageBodyCodeTextStyle,
- dynamic receivedMessageBodyLinkTextStyle,
- dynamic receivedMessageBodyTextStyle = const TextStyle(color: neutral0, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
- dynamic receivedMessageCaptionTextStyle = const TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333),
- dynamic receivedMessageDocumentIconColor = primary,
- dynamic receivedMessageLinkDescriptionTextStyle = const TextStyle(color: neutral0, fontSize: 14, fontWeight: FontWeight.w400, height: 1.428),
- dynamic receivedMessageLinkTitleTextStyle = const TextStyle(color: neutral0, fontSize: 16, fontWeight: FontWeight.w800, height: 1.375),
- dynamic secondaryColor = secondary,
- dynamic seenIcon,
- dynamic sendButtonIcon,
- dynamic sendButtonMargin,
- dynamic sendingIcon,
- dynamic sentEmojiMessageTextStyle = const TextStyle(fontSize: 40),
- dynamic sentMessageBodyBoldTextStyle,
- dynamic sentMessageBodyCodeTextStyle,
- dynamic sentMessageBodyLinkTextStyle,
- dynamic sentMessageBodyTextStyle = const TextStyle(color: neutral7, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
- dynamic sentMessageCaptionTextStyle = const TextStyle(color: Colors.black87, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333),
- dynamic sentMessageDocumentIconColor = neutral7,
- dynamic sentMessageLinkDescriptionTextStyle = const TextStyle(color: neutral7, fontSize: 14, fontWeight: FontWeight.w400, height: 1.428),
- dynamic sentMessageLinkTitleTextStyle = const TextStyle(color: neutral7, fontSize: 16, fontWeight: FontWeight.w800, height: 1.375),
- dynamic statusIconPadding = const EdgeInsets.symmetric(horizontal: 4),
- dynamic 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)),
- dynamic 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)),
- dynamic unreadHeaderTheme = const UnreadHeaderTheme(color: secondary, textStyle: TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333)),
- dynamic userAvatarImageBackgroundColor = Colors.transparent,
- dynamic userAvatarNameColors = colors,
- dynamic userAvatarTextStyle = const TextStyle(color: neutral7, fontSize: 12, fontWeight: FontWeight.w800, height: 1.333),
- dynamic 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
Implementation
const DefaultChatTheme({
attachmentButtonIcon,
attachmentButtonMargin,
backgroundColor = neutral7,
dateDividerMargin = const EdgeInsets.only(
bottom: 32,
top: 16,
),
dateDividerTextStyle = const TextStyle(
color: neutral2,
fontSize: 12,
fontWeight: FontWeight.w800,
height: 1.333,
),
deliveredIcon,
documentIcon,
emptyChatPlaceholderTextStyle = const TextStyle(
color: neutral2,
fontSize: 16,
fontWeight: FontWeight.w500,
height: 1.5,
),
errorColor = error,
errorIcon,
inputBackgroundColor = neutral0,
inputBorderRadius = const BorderRadius.vertical(
top: Radius.circular(20),
),
inputContainerDecoration,
inputMargin = EdgeInsets.zero,
inputPadding = const EdgeInsets.fromLTRB(24, 20, 24, 20),
inputTextColor = neutral7,
inputTextCursorColor,
inputTextDecoration = const InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.zero,
isCollapsed: true,
),
inputTextStyle = const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
height: 1.5,
),
messageBorderRadius = 20.0,
messageInsetsHorizontal = 20.0,
messageInsetsVertical = 16.0,
primaryColor = primary,
receivedEmojiMessageTextStyle = const TextStyle(fontSize: 40),
receivedMessageBodyBoldTextStyle,
receivedMessageBodyCodeTextStyle,
receivedMessageBodyLinkTextStyle,
receivedMessageBodyTextStyle = const TextStyle(
color: neutral0,
fontSize: 16,
fontWeight: FontWeight.w500,
height: 1.5,
),
receivedMessageCaptionTextStyle = const TextStyle(
color: neutral2,
fontSize: 12,
fontWeight: FontWeight.w500,
height: 1.333,
),
receivedMessageDocumentIconColor = primary,
receivedMessageLinkDescriptionTextStyle = const TextStyle(
color: neutral0,
fontSize: 14,
fontWeight: FontWeight.w400,
height: 1.428,
),
receivedMessageLinkTitleTextStyle = const TextStyle(
color: neutral0,
fontSize: 16,
fontWeight: FontWeight.w800,
height: 1.375,
),
secondaryColor = secondary,
seenIcon,
sendButtonIcon,
sendButtonMargin,
sendingIcon,
sentEmojiMessageTextStyle = const TextStyle(fontSize: 40),
sentMessageBodyBoldTextStyle,
sentMessageBodyCodeTextStyle,
sentMessageBodyLinkTextStyle,
sentMessageBodyTextStyle = const TextStyle(
color: neutral7,
fontSize: 16,
fontWeight: FontWeight.w500,
height: 1.5,
),
sentMessageCaptionTextStyle = const TextStyle(
color: Colors.black87,
fontSize: 12,
fontWeight: FontWeight.w500,
height: 1.333,
),
sentMessageDocumentIconColor = neutral7,
sentMessageLinkDescriptionTextStyle = const TextStyle(
color: neutral7,
fontSize: 14,
fontWeight: FontWeight.w400,
height: 1.428,
),
sentMessageLinkTitleTextStyle = const TextStyle(
color: neutral7,
fontSize: 16,
fontWeight: FontWeight.w800,
height: 1.375,
),
statusIconPadding = const EdgeInsets.symmetric(horizontal: 4),
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 = 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 = const UnreadHeaderTheme(
color: secondary,
textStyle: TextStyle(
color: neutral2,
fontSize: 12,
fontWeight: FontWeight.w500,
height: 1.333,
),
),
userAvatarImageBackgroundColor = Colors.transparent,
userAvatarNameColors = colors,
userAvatarTextStyle = const TextStyle(
color: neutral7,
fontSize: 12,
fontWeight: FontWeight.w800,
height: 1.333,
),
userNameTextStyle = const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w800,
height: 1.333,
),
}) : super(
attachmentButtonIcon: attachmentButtonIcon,
attachmentButtonMargin: attachmentButtonMargin,
backgroundColor: backgroundColor,
dateDividerMargin: dateDividerMargin,
dateDividerTextStyle: dateDividerTextStyle,
deliveredIcon: deliveredIcon,
documentIcon: documentIcon,
emptyChatPlaceholderTextStyle: emptyChatPlaceholderTextStyle,
errorColor: errorColor,
errorIcon: errorIcon,
inputBackgroundColor: inputBackgroundColor,
inputBorderRadius: inputBorderRadius,
inputMargin: inputMargin,
inputPadding: inputPadding,
inputTextColor: inputTextColor,
inputTextDecoration: inputTextDecoration,
inputTextStyle: inputTextStyle,
messageBorderRadius: messageBorderRadius,
messageInsetsHorizontal: messageInsetsHorizontal,
messageInsetsVertical: messageInsetsVertical,
primaryColor: primaryColor,
receivedEmojiMessageTextStyle: receivedEmojiMessageTextStyle,
inputContainerDecoration: inputContainerDecoration,
inputTextCursorColor: inputTextCursorColor,
receivedMessageBodyTextStyle: receivedMessageBodyBoldTextStyle,
receivedMessageCaptionTextStyle: receivedMessageCaptionTextStyle,
receivedMessageDocumentIconColor: receivedMessageDocumentIconColor,
receivedMessageLinkDescriptionTextStyle:
receivedMessageLinkDescriptionTextStyle,
receivedMessageLinkTitleTextStyle: receivedMessageLinkTitleTextStyle,
secondaryColor: secondaryColor,
seenIcon: seenIcon,
sendButtonIcon: sendButtonIcon,
sendButtonMargin: sendButtonMargin,
sendingIcon: sendingIcon,
sentEmojiMessageTextStyle: sentEmojiMessageTextStyle,
sentMessageBodyTextStyle: sentMessageBodyBoldTextStyle,
sentMessageCaptionTextStyle: sentMessageCaptionTextStyle,
sentMessageDocumentIconColor: sentMessageDocumentIconColor,
sentMessageLinkDescriptionTextStyle:
sentMessageLinkDescriptionTextStyle,
sentMessageLinkTitleTextStyle: sentMessageLinkTitleTextStyle,
sentMessageBodyBoldTextStyle: sentMessageBodyTextStyle,
sentMessageBodyCodeTextStyle: sentMessageBodyCodeTextStyle,
sentMessageBodyLinkTextStyle: sentMessageBodyLinkTextStyle,
statusIconPadding: statusIconPadding,
unreadHeaderTheme: unreadHeaderTheme,
userAvatarImageBackgroundColor: userAvatarImageBackgroundColor,
userAvatarNameColors: userAvatarNameColors,
userAvatarTextStyle: userAvatarTextStyle,
userNameTextStyle: userNameTextStyle,
receivedMessageBodyBoldTextStyle: receivedMessageBodyBoldTextStyle,
receivedMessageBodyCodeTextStyle: receivedMessageBodyCodeTextStyle,
receivedMessageBodyLinkTextStyle: receivedMessageBodyLinkTextStyle,
typingIndicatorTheme: typingIndicatorTheme,
systemMessageTheme: systemMessageTheme,
);