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. Color inputSurfaceTintColor = neutral0,
  13. double inputElevation = 0,
  14. BorderRadius inputBorderRadius = const BorderRadius.vertical(top: Radius.circular(20)),
  15. Decoration? inputContainerDecoration,
  16. EdgeInsets inputMargin = EdgeInsets.zero,
  17. EdgeInsets inputPadding = const EdgeInsets.fromLTRB(24, 20, 24, 20),
  18. Color inputTextColor = neutral7,
  19. Color? inputTextCursorColor,
  20. InputDecoration inputTextDecoration = const InputDecoration(border: InputBorder.none, contentPadding: EdgeInsets.zero, isCollapsed: true),
  21. TextStyle inputTextStyle = const TextStyle(fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  22. double messageBorderRadius = 20,
  23. double messageInsetsHorizontal = 20,
  24. double messageInsetsVertical = 16,
  25. double messageMaxWidth = 440,
  26. Color primaryColor = primary,
  27. TextStyle receivedEmojiMessageTextStyle = const TextStyle(fontSize: 40),
  28. TextStyle? receivedMessageBodyBoldTextStyle,
  29. TextStyle? receivedMessageBodyCodeTextStyle,
  30. TextStyle? receivedMessageBodyLinkTextStyle,
  31. TextStyle receivedMessageBodyTextStyle = const TextStyle(color: neutral0, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  32. TextStyle receivedMessageCaptionTextStyle = const TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333),
  33. Color receivedMessageDocumentIconColor = primary,
  34. TextStyle receivedMessageLinkDescriptionTextStyle = const TextStyle(color: neutral0, fontSize: 14, fontWeight: FontWeight.w400, height: 1.428),
  35. TextStyle receivedMessageLinkTitleTextStyle = const TextStyle(color: neutral0, fontSize: 16, fontWeight: FontWeight.w800, height: 1.375),
  36. Color secondaryColor = secondary,
  37. Widget? seenIcon,
  38. Widget? sendButtonIcon,
  39. EdgeInsets? sendButtonMargin,
  40. Widget? sendingIcon,
  41. TextStyle sentEmojiMessageTextStyle = const TextStyle(fontSize: 40),
  42. TextStyle? sentMessageBodyBoldTextStyle,
  43. TextStyle? sentMessageBodyCodeTextStyle,
  44. TextStyle? sentMessageBodyLinkTextStyle,
  45. TextStyle sentMessageBodyTextStyle = const TextStyle(color: neutral7, fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  46. TextStyle sentMessageCaptionTextStyle = const TextStyle(color: neutral7WithOpacity, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333),
  47. Color sentMessageDocumentIconColor = neutral7,
  48. TextStyle sentMessageLinkDescriptionTextStyle = const TextStyle(color: neutral7, fontSize: 14, fontWeight: FontWeight.w400, height: 1.428),
  49. TextStyle sentMessageLinkTitleTextStyle = const TextStyle(color: neutral7, fontSize: 16, fontWeight: FontWeight.w800, height: 1.375),
  50. EdgeInsets statusIconPadding = const EdgeInsets.symmetric(horizontal: 4),
  51. 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)),
  52. 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)),
  53. UnreadHeaderTheme unreadHeaderTheme = const UnreadHeaderTheme(color: secondary, textStyle: TextStyle(color: neutral2, fontSize: 12, fontWeight: FontWeight.w500, height: 1.333)),
  54. Color userAvatarImageBackgroundColor = Colors.transparent,
  55. List<Color> userAvatarNameColors = colors,
  56. TextStyle userAvatarTextStyle = const TextStyle(color: neutral7, fontSize: 12, fontWeight: FontWeight.w800, height: 1.333),
  57. TextStyle userNameTextStyle = const TextStyle(fontSize: 12, fontWeight: FontWeight.w800, height: 1.333),
  58. Color? highlightMessageColor,
})

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.inputSurfaceTintColor = neutral0,
  super.inputElevation = 0,
  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.messageMaxWidth = 440,
  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,
  ),
  super.highlightMessageColor,
});