dash_chat
dash_chat copied to clipboard
1.1.16 cannot show emojis
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
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.
@fayeed Any updates on this?
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.
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.