Last updated:
0 purchases
emojis
Emojis #
๐ฅ Emoji for Dart ๐ฅ Over 3300 Emojis
This ๐ฆ contain all ๐ Unicode 13.1 Emojis (2๏ธโฃ0๏ธโฃ2๏ธโฃ1๏ธโฃ)
๐ช supports null safety ๐ช
๐ ๏ธ Usage #
0๏ธโฃ Import
import 'package:emojis/emojis.dart'; // to use Emoji collection
import 'package:emojis/emoji.dart'; // to use Emoji utilities
copied to clipboard
1๏ธโฃ Use
print('I ${Emojis.greenHeart} ${Emojis.bullseye}'); // I ๐ ๐ฏ
Emoji? smile = Emoji.byName('hi'); // get a emoji by its name
if (smile != null) {
print('Emoji name : ${smile.name}');
// Emoji name is Grinning Face
print('Emoji character : ${smile.char}');
// Emoji character is '๐'
print('Emoji category : ${smile.emojiGroup}');
// EmojiGroup.smileysEmotion group of emoji
print('Emoji sub-group : ${smile.emojiSubgroup}');
// EmojiSubgroup.faceSmiling sub group of emoji
} else {
print('Emoji not found!');
}
// 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
print(emList[2]); // second emoji in list
// 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);
// (๐, ๐, ๐, ๐, ๐, ๐, ๐, ๐ฅญ, ๐, ๐, ๐, ๐, ๐, ๐, ๐ฅ, ๐
, ๐ฅฅ, ๐ฅ, ...)
Iterable<Emoji> moneySubgroupEmojis = Emoji.bySubgroup(EmojiSubgroup.money); // returns emojis in Money subgroup
print(moneySubgroupEmojis);
// (๐ฐ, ๐ด, ๐ต, ๐ถ, ๐ท, ๐ธ, ๐ณ, ๐งพ, ๐น)
copied to clipboard
๐ Features #
All Present unicode emojis ๐ฏ.
Get Emojis by Name, Category, Keyword & ...
Modify Emoji with ๐ skin color ( ๐ป ๐ผ ๐ฝ ๐พ ๐ฟ ).
Stabilize Emoji (No Skin color, No Gender).
Assemble Emojis (๐ฉ + โค + ๐ฉ = ๐ฉโโค๏ธโ๐ฉ ).
Disassemble Emojis (๐จโ๐ง = ๐ง + ๐ง).
Emoji Regex Pattern.
Emojize and Demojize text.
Find emojis in text.
Replace emojis in text.
๐ License #
BDS 3 License
Copyright 2021 ยฉ Naji
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.