breakWord function

String breakWord(
  1. String word
)

Fixed TextOverflow.ellipsis

Text(breakWord(str),

Implementation

//    maxLines: 1,
//    overflow: TextOverflow.ellipsis);
/// ```
String breakWord(String word) {
  if (word.isEmpty) {
    return word;
  }
  String breakWord = '';
  word.runes.forEach((element) {
    breakWord += String.fromCharCode(element);
    breakWord += '\u200B';
  });
  return breakWord;
}