clean method

String clean(
  1. String text, [
  2. String word = '',
  3. bool trimText = true
])

Accurately replace/remove emojis in text strings Returns a copy of string without emoji characters/

print(RemoveEmoji().clean('πŸ³οΈπŸ΄πŸ΄β€β˜ οΈπŸhiπŸš©πŸ‡ΊπŸ‡³'));

//or

print('πŸ³οΈπŸ΄πŸ΄β€β˜ οΈπŸhiπŸš©πŸ‡ΊπŸ‡³'.removeEmoji);

Implementation

String clean(String text, [String word = '', bool trimText = true]) =>
    trimText
        ? text
            .replaceAll(
                RegExp(
                  r,
                ),
                word)
            .trim()
        : text.replaceAll(RegExp(r), word);