fromId static method
Return the animated emoji that equals id
.
When no emoji is found a EmojiNotFoundException is thrown.
// Will return a firework emoji 🎆
AnimatedEmojis.fromId('u1f386')
Implementation
static AnimatedEmojiData fromId(String id) {
try {
return values.firstWhere((element) => element.id == id);
} catch (_) {
throw EmojiNotFoundException.fromId(id);
}
}