DefaultChatTheme constructor

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