DefaultChatTheme constructor

const DefaultChatTheme({
  1. Widget? attachmentButtonIcon,
  2. EdgeInsets? attachmentButtonMargin,
  3. Color backgroundColor = neutral7,
  4. EdgeInsets dateDividerMargin = const EdgeInsets.only(bottom: 32, top: 16),
  5. TextStyle dateDividerTextStyle = const TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w800, height: 1.333),
  6. Widget? deliveredIcon,
  7. Widget? documentIcon,
  8. TextStyle emptyChatPlaceholderTextStyle = const TextStyle(color: neutral2, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  9. Color errorColor = error,
  10. Widget? errorIcon,
  11. Color inputBackgroundColor = neutral0,
  12. BorderRadius inputBorderRadius = const BorderRadius.vertical(top: Radius.circular(20)),
  13. Decoration? inputContainerDecoration,
  14. EdgeInsets inputMargin = EdgeInsets.zero,
  15. EdgeInsets inputPadding = const EdgeInsets.fromLTRB(24, 20, 24, 20),
  16. Color inputTextColor = neutral7,
  17. Color? inputTextCursorColor,
  18. InputDecoration inputTextDecoration = const InputDecoration(border: InputBorder.none, contentPadding: EdgeInsets.zero, isCollapsed: true),
  19. TextStyle inputTextStyle = const TextStyle(fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  20. double messageBorderRadius = 20,
  21. double messageInsetsHorizontal = 20,
  22. double messageInsetsVertical = 16,
  23. Color primaryColor = primary,
  24. TextStyle receivedEmojiMessageTextStyle = const TextStyle(fontSize: 40),
  25. TextStyle? receivedMessageBodyBoldTextStyle,
  26. TextStyle? receivedMessageBodyCodeTextStyle,
  27. TextStyle? receivedMessageBodyLinkTextStyle,
  28. TextStyle receivedMessageBodyTextStyle = const TextStyle(color: neutral0, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  29. TextStyle receivedMessageCaptionTextStyle = const TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333),
  30. Color receivedMessageDocumentIconColor = primary,
  31. TextStyle receivedMessageLinkDescriptionTextStyle = const TextStyle(color: neutral0, fontSize: 14, fontWeight: FontWeight.w400, height: 1.428),
  32. TextStyle receivedMessageLinkTitleTextStyle = const TextStyle(color: neutral0, fontSize: 16, fontWeight: FontWeight.w800, height: 1.375),
  33. Color secondaryColor = secondary,
  34. Widget? seenIcon,
  35. Widget? sendButtonIcon,
  36. EdgeInsets? sendButtonMargin,
  37. Widget? sendingIcon,
  38. TextStyle sentEmojiMessageTextStyle = const TextStyle(fontSize: 40),
  39. TextStyle? sentMessageBodyBoldTextStyle,
  40. TextStyle? sentMessageBodyCodeTextStyle,
  41. TextStyle? sentMessageBodyLinkTextStyle,
  42. TextStyle sentMessageBodyTextStyle = const TextStyle(color: neutral7, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  43. TextStyle sentMessageCaptionTextStyle = const TextStyle(color: neutral7WithOpacity, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333),
  44. Color sentMessageDocumentIconColor = neutral7,
  45. TextStyle sentMessageLinkDescriptionTextStyle = const TextStyle(color: neutral7, fontSize: 14, fontWeight: FontWeight.w400, height: 1.428),
  46. TextStyle sentMessageLinkTitleTextStyle = const TextStyle(color: neutral7, fontSize: 16, fontWeight: FontWeight.w800, height: 1.375),
  47. EdgeInsets statusIconPadding = const EdgeInsets.symmetric(horizontal: 4),
  48. 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)),
  49. 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)),
  50. UnreadHeaderTheme unreadHeaderTheme = const UnreadHeaderTheme(color: secondary, textStyle: TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333)),
  51. Color userAvatarImageBackgroundColor = Colors.transparent,
  52. List<Color> userAvatarNameColors = colors,
  53. TextStyle userAvatarTextStyle = const TextStyle(color: neutral7, fontSize: 12, fontWeight: FontWeight.w800, height: 1.333),
  54. 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,
  ),
});