Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customized Font Sizes #161

Open
BJRichardsAZ opened this issue Feb 19, 2021 · 1 comment
Open

Customized Font Sizes #161

BJRichardsAZ opened this issue Feb 19, 2021 · 1 comment
Labels
question Further information is requested wontfix This will not be worked on

Comments

@BJRichardsAZ
Copy link

Hello, I wanted to reach out to see if I could maybe get some help on an issue regarding changing the style of the text in the messages dash chat generates. In our project we are using dashchat to help connect senior citizens with other users of the app; to make it more accessible we wanted to be able to increase the font size for all text fields on the chat widget. However the only easily accessible style property is the style for the input field. I'm assuming right now that the best way to customize the style would be to utilize the builder properties such as messageTextBuilder, but I'm having trouble figuring out how to implement those properties. Would you maybe be willing to provide a quick example or some pointers on how to do so? Any help would be greatly appreciated! Thank you.

@BJRichardsAZ BJRichardsAZ added the question Further information is requested label Feb 19, 2021
@azazadev
Copy link

azazadev commented Aug 6, 2021

Hi @BJRichardsAZ : you can override style like this :


  messageTextBuilder: (String message,
      [ChatMessage chatMessage]) {
    // model.currentUser.id return the current user Id, used to set the color of text
    bool isUser = chatMessage.user.uid == model.currentUser.id; 
    return Text(message,
        style: GoogleFonts.lato(
            fontSize: 15,
            fontWeight: FontWeight.w700,
            color: isUser ? Colors.white70 : Colors.black87));
  },

@SebastienBtr SebastienBtr added the wontfix This will not be worked on label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants