containsOnlyOneEmoji property

bool get containsOnlyOneEmoji

Checks if the string contains only one emoji.

Implementation

bool get containsOnlyOneEmoji {
  String textWithoutEmojis = replaceAll(RegexUtils.singleEmoji, '');
  return textWithoutEmojis.isEmpty && RegexUtils.emoji.allMatches(this).length == 1;
}