emoji property

String get emoji

Get Emoji from Country Code Symbol Like "NP".emoji return nepal flag (🇳🇵)

Implementation

String get emoji {
  try {
    final int firstLetter = codeUnitAt(0) - 0x41 + 0x1F1E6;
    final int secondLetter = codeUnitAt(1) - 0x41 + 0x1F1E6;
    return String.fromCharCode(firstLetter) +
        String.fromCharCode(secondLetter);
  } catch (e) {
    return this;
  }
}