Error when collapsing on an emoji
Closed this issue · 3 comments
LeGoffMael commented
When the last character of the line that is collapsed is an emoji, an error is thrown :
════════ Exception caught by painting library ══════════════════════════════════
The following ArgumentError was thrown while building a TextSpan:
Invalid argument(s): string is not well-formed UTF-16
LeGoffMael commented
This error occurs only when a preDataText
param is specified
neo1125 commented
I guess this is the problem
widget.data.substring(0, endIndex)
=> String.fromCharCodes(widget.data.runes, 0, endIndex)
Faiizii commented
Can you please upload minimum reproducible code?