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

1.1.16 cannot show emojis #176

Open
edukun opened this issue Jun 3, 2021 · 4 comments
Open

1.1.16 cannot show emojis #176

edukun opened this issue Jun 3, 2021 · 4 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@edukun
Copy link

edukun commented Jun 3, 2021

1.1.16 break emojis. If you try to load a message with an emoji, you get this error:

invalid argument(s) string is not well-formed utf-16

Rolling back to 1.1.15 fixes the problem. With this configuration:

dependencies:
dash_chat: 1.1.15
dependency_overrides:
intl: ^0.17.0
uuid: ^3.0.0

@edukun edukun added the bug Something isn't working label Jun 3, 2021
@oneshoot41
Copy link

Any fix here ? Really need that 1.1.16 cause working with both dash_chat and flutter_parsed_text 2.2, 1.1.15 need flutter_parsed_text 1.1 which not work with my current code.

@Johan-glitch1412
Copy link

@fayeed Any updates on this?

@Rexios80
Copy link

Bump. I was planning on making my own chat interface anyways but having one that works in the meantime would be nice. @Johan-glitch1412 the fix you mentioned doesn't work for me.

@giaunguyen2176
Copy link

giaunguyen2176 commented Aug 27, 2021

Took me a while to figure this out. Use a custom text builder, something as below:

...
messageTextBuilder: buildTextMessage,
...
Widget buildTextMessage(String? text, [ChatMessage? message]) {
    bool isUser = message!.user.uid == vm.user.uid;
    return ParsedText(
      parse: [],
      regexOptions: RegexOptions(unicode: true),
      text: message.text!,
      style: TextStyle(
        color: message.user.color ??
            (isUser ? Colors.white70 : Colors.black87),
      ),
    );
}

The default builder took regexOptions with unicode = false causing the error.

@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
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants