getMessageInputTextStyle method

  1. @override
TextStyle getMessageInputTextStyle(
  1. CometChatTheme theme, {
  2. bool isLoggedInUser = false,
})
override

getMessageInputTextStyle is a TextStyle object which is used to style the message input text

Implementation

@override
TextStyle getMessageInputTextStyle(CometChatTheme theme,
    {bool isLoggedInUser = false}) {
  if (messageInputTextStyle != null) {
    return messageInputTextStyle!(theme);
  } else {
    // if user is logged in user then we will show the text in bold
    return TextStyle(
        color: theme.palette.getPrimary(),
        fontWeight: isLoggedInUser
            ? theme.typography.heading.fontWeight
            : theme.typography.body.fontWeight,
        fontSize: theme.typography.body.fontSize,
        fontFamily: theme.typography.body.fontFamily,
        decoration: TextDecoration.none);
  }
}