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