This package is based on the source code of emojis and is an attempt to made some improvements, mainly migrate to null safety.
🔥 Emoji for Dart 🔥 Over 3300 Emojis
This 📦 contain all 🆕 Unicode 13 Emojis (2️0️2️0️)
0️⃣ Import
import 'package:emojis/emojis.dart'; // to use Emoji collection
import 'package:emojis/emoji.dart'; // to use Emoji utilities
1️⃣ Use
print('I ${Emojis.greenHeart} ${Emojis.directHit}'); // I 💚 🎯
Emoji smile = Emoji.byName('Grinning Face'); // get a emoji by its name
print('Emoji name : ${smile.name}');
// Emoji name is Grinning Face
print('Emoji character : ${smile.char}');
// Emoji character '😀'
print('Emoji category : ${smile.emojiGroup}');
// EmojiGroup.smileysEmotion group of emoji
print('Emoji sub-group : ${smile.emojiSubgroup}');
// EmojiSubgroup.faceSmiling sub group of emoji
// get an emoji by its character 👱♀️
Emoji womanBlond = Emoji.byChar(Emojis.womanBlondHair);
print(womanBlond);
// make blondy in black
Emoji blondyBlackLady = womanBlond.newSkin(fitzpatrick.dark);
print(blondyBlackLady); // 👱🏿♀️
List<Emoji> emList = Emoji.all(); // list of all Emojis
// disassemble an emoji
List<String> disassembled = Emoji.disassemble(Emojis.mechanic);
print(disassembled); // ['🔧', '🧑']
// assemble some emojis
String assembled = Emoji.assemble([Emojis.man, Emojis.man, Emojis.girl, Emojis.boy]);
print(assembled); // 👨👨👧👦️
String blackThumbsUp = '👍';
// modify skin tone of emoji
String witheThumbsUp = Emoji.modify(blackThumbsUp, fitzpatrick.light);
print(witheThumbsUp); // 👍🏻
// A Woman Police Officer With Brown Skin
String femaleCop = Emojis.womanPoliceOfficerMediumDarkSkinTone;
// Make that woman to just a Woman Police Officer with no special skin color
String newFemaleCop = Emoji.stabilize(femaleCop);
print('$femaleCop => $newFemaleCop'); //👮🏾♀️ => 👮♀️
// gender-neutral
String aCop = Emoji.stabilize(femaleCop, skin: false, gender: true);
print('$femaleCop => $aCop'); //👮🏾♀️=> 👮🏾 no gender! still medium dark
final loveEmojis = Emoji.byKeyword('love'); // returns list of lovely emojis :)
print(loveEmojis);
// (🥰, 😍, 😘, 😚, 😙, 🤗, 😻, 😽, 💋, 💌, 💘, 💝, 💖, 💗, 💓, 💞, 💕, ..., 💄, ♾)
final foodCategory = Emoji.byGroup(EmojiGroup.foodDrink); // returns emojis in Food and Drink group
print(foodCategory);
// (🍇, 🍈, 🍉, 🍊, 🍋, 🍌, 🍍, 🥭, 🍎, 🍏, 🍐, 🍑, 🍒, 🍓, 🥝, 🍅, 🥥, 🥑, ...)
eIterable<Emoji> moneySubgroupEmojis = Emoji.bySubgroup(EmojiSubgroup.money); // returns emojis in Money subgroup
print(moneySubgroupEmojis);
// (💰, 💴, 💵, 💶, 💷, 💸, 💳, 🧾, 💹)
- Migrate to null safety
- Add unicode 13.1 emojis
- Emojize and Demojize text
- Find emojis in text
- Replace emojis in text
- BDS 3 License
- Copyright 2021 © Davi Resio