DefaultChatTheme constructor

const DefaultChatTheme({
  1. Widget? attachmentButtonIcon,
  2. Color backgroundColor = NEUTRAL_7,
  3. TextStyle dateDividerTextStyle = const TextStyle(color: NEUTRAL_2, fontFamily: 'Avenir', fontSize: 12, fontWeight: FontWeight.w800, height: 1.333),
  4. Widget? deliveredIcon,
  5. Widget? documentIcon,
  6. TextStyle emptyChatPlaceholderTextStyle = const TextStyle(color: NEUTRAL_2, fontFamily: 'Avenir', fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  7. Color errorColor = ERROR,
  8. Widget? errorIcon,
  9. Color inputBackgroundColor = NEUTRAL_0,
  10. BorderRadius inputBorderRadius = const BorderRadius.vertical(top: Radius.circular(20)),
  11. Color inputTextColor = NEUTRAL_7,
  12. TextStyle inputTextStyle = const TextStyle(fontFamily: 'Avenir', fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  13. double messageBorderRadius = 20.0,
  14. Color primaryColor = PRIMARY,
  15. TextStyle receivedMessageBodyTextStyle = const TextStyle(color: NEUTRAL_0, fontFamily: 'Avenir', fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  16. TextStyle receivedMessageCaptionTextStyle = const TextStyle(color: NEUTRAL_2, fontFamily: 'Avenir', fontSize: 12, fontWeight: FontWeight.w500, height: 1.333),
  17. Color receivedMessageDocumentIconColor = PRIMARY,
  18. TextStyle receivedMessageLinkDescriptionTextStyle = const TextStyle(color: NEUTRAL_0, fontFamily: 'Avenir', fontSize: 14, fontWeight: FontWeight.w400, height: 1.428),
  19. TextStyle receivedMessageLinkTitleTextStyle = const TextStyle(color: NEUTRAL_0, fontFamily: 'Avenir', fontSize: 16, fontWeight: FontWeight.w800, height: 1.375),
  20. Color secondaryColor = SECONDARY,
  21. Widget? seenIcon,
  22. Widget? sendButtonIcon,
  23. TextStyle sentMessageBodyTextStyle = const TextStyle(color: NEUTRAL_7, fontFamily: 'Avenir', fontSize: 16, fontWeight: FontWeight.w500, height: 1.5),
  24. TextStyle sentMessageCaptionTextStyle = const TextStyle(color: NEUTRAL_7_WITH_OPACITY, fontFamily: 'Avenir', fontSize: 12, fontWeight: FontWeight.w500, height: 1.333),
  25. Color sentMessageDocumentIconColor = NEUTRAL_7,
  26. TextStyle sentMessageLinkDescriptionTextStyle = const TextStyle(color: NEUTRAL_7, fontFamily: 'Avenir', fontSize: 14, fontWeight: FontWeight.w400, height: 1.428),
  27. TextStyle sentMessageLinkTitleTextStyle = const TextStyle(color: NEUTRAL_7, fontFamily: 'Avenir', fontSize: 16, fontWeight: FontWeight.w800, height: 1.375),
  28. List<Color> userAvatarNameColors = COLORS,
  29. TextStyle userAvatarTextStyle = const TextStyle(color: NEUTRAL_7, fontFamily: 'Avenir', fontSize: 12, fontWeight: FontWeight.w800, height: 1.333),
  30. TextStyle userNameTextStyle = const TextStyle(fontFamily: 'Avenir', 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 variables, otherwise create a new class which extends ChatTheme

Implementation

const DefaultChatTheme({
  Widget? attachmentButtonIcon,
  Color backgroundColor = NEUTRAL_7,
  TextStyle dateDividerTextStyle = const TextStyle(
    color: NEUTRAL_2,
    fontFamily: 'Avenir',
    fontSize: 12,
    fontWeight: FontWeight.w800,
    height: 1.333,
  ),
  Widget? deliveredIcon,
  Widget? documentIcon,
  TextStyle emptyChatPlaceholderTextStyle = const TextStyle(
    color: NEUTRAL_2,
    fontFamily: 'Avenir',
    fontSize: 16,
    fontWeight: FontWeight.w500,
    height: 1.5,
  ),
  Color errorColor = ERROR,
  Widget? errorIcon,
  Color inputBackgroundColor = NEUTRAL_0,
  BorderRadius inputBorderRadius = const BorderRadius.vertical(
    top: Radius.circular(20),
  ),
  Color inputTextColor = NEUTRAL_7,
  TextStyle inputTextStyle = const TextStyle(
    fontFamily: 'Avenir',
    fontSize: 16,
    fontWeight: FontWeight.w500,
    height: 1.5,
  ),
  double messageBorderRadius = 20.0,
  Color primaryColor = PRIMARY,
  TextStyle receivedMessageBodyTextStyle = const TextStyle(
    color: NEUTRAL_0,
    fontFamily: 'Avenir',
    fontSize: 16,
    fontWeight: FontWeight.w500,
    height: 1.5,
  ),
  TextStyle receivedMessageCaptionTextStyle = const TextStyle(
    color: NEUTRAL_2,
    fontFamily: 'Avenir',
    fontSize: 12,
    fontWeight: FontWeight.w500,
    height: 1.333,
  ),
  Color receivedMessageDocumentIconColor = PRIMARY,
  TextStyle receivedMessageLinkDescriptionTextStyle = const TextStyle(
    color: NEUTRAL_0,
    fontFamily: 'Avenir',
    fontSize: 14,
    fontWeight: FontWeight.w400,
    height: 1.428,
  ),
  TextStyle receivedMessageLinkTitleTextStyle = const TextStyle(
    color: NEUTRAL_0,
    fontFamily: 'Avenir',
    fontSize: 16,
    fontWeight: FontWeight.w800,
    height: 1.375,
  ),
  Color secondaryColor = SECONDARY,
  Widget? seenIcon,
  Widget? sendButtonIcon,
  TextStyle sentMessageBodyTextStyle = const TextStyle(
    color: NEUTRAL_7,
    fontFamily: 'Avenir',
    fontSize: 16,
    fontWeight: FontWeight.w500,
    height: 1.5,
  ),
  TextStyle sentMessageCaptionTextStyle = const TextStyle(
    color: NEUTRAL_7_WITH_OPACITY,
    fontFamily: 'Avenir',
    fontSize: 12,
    fontWeight: FontWeight.w500,
    height: 1.333,
  ),
  Color sentMessageDocumentIconColor = NEUTRAL_7,
  TextStyle sentMessageLinkDescriptionTextStyle = const TextStyle(
    color: NEUTRAL_7,
    fontFamily: 'Avenir',
    fontSize: 14,
    fontWeight: FontWeight.w400,
    height: 1.428,
  ),
  TextStyle sentMessageLinkTitleTextStyle = const TextStyle(
    color: NEUTRAL_7,
    fontFamily: 'Avenir',
    fontSize: 16,
    fontWeight: FontWeight.w800,
    height: 1.375,
  ),
  List<Color> userAvatarNameColors = COLORS,
  TextStyle userAvatarTextStyle = const TextStyle(
    color: NEUTRAL_7,
    fontFamily: 'Avenir',
    fontSize: 12,
    fontWeight: FontWeight.w800,
    height: 1.333,
  ),
  TextStyle userNameTextStyle = const TextStyle(
    fontFamily: 'Avenir',
    fontSize: 12,
    fontWeight: FontWeight.w800,
    height: 1.333,
  ),
}) : super(
        attachmentButtonIcon: attachmentButtonIcon,
        backgroundColor: backgroundColor,
        dateDividerTextStyle: dateDividerTextStyle,
        deliveredIcon: deliveredIcon,
        documentIcon: documentIcon,
        emptyChatPlaceholderTextStyle: emptyChatPlaceholderTextStyle,
        errorColor: errorColor,
        errorIcon: errorIcon,
        inputBackgroundColor: inputBackgroundColor,
        inputBorderRadius: inputBorderRadius,
        inputTextColor: inputTextColor,
        inputTextStyle: inputTextStyle,
        messageBorderRadius: messageBorderRadius,
        primaryColor: primaryColor,
        receivedMessageBodyTextStyle: receivedMessageBodyTextStyle,
        receivedMessageCaptionTextStyle: receivedMessageCaptionTextStyle,
        receivedMessageDocumentIconColor: receivedMessageDocumentIconColor,
        receivedMessageLinkDescriptionTextStyle:
            receivedMessageLinkDescriptionTextStyle,
        receivedMessageLinkTitleTextStyle: receivedMessageLinkTitleTextStyle,
        secondaryColor: secondaryColor,
        seenIcon: seenIcon,
        sendButtonIcon: sendButtonIcon,
        sentMessageBodyTextStyle: sentMessageBodyTextStyle,
        sentMessageCaptionTextStyle: sentMessageCaptionTextStyle,
        sentMessageDocumentIconColor: sentMessageDocumentIconColor,
        sentMessageLinkDescriptionTextStyle:
            sentMessageLinkDescriptionTextStyle,
        sentMessageLinkTitleTextStyle: sentMessageLinkTitleTextStyle,
        userAvatarNameColors: userAvatarNameColors,
        userAvatarTextStyle: userAvatarTextStyle,
        userNameTextStyle: userNameTextStyle,
      );