搜尋套件、儲存庫與 APP 分類

套件詳情v3.2.0

emojis

Dart 的表情符號!此套件包含所有 Unicode 13.0 表情符號(2020)!

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1.9萬
喜歡數
110
Pub 分數
140

安裝套件

flutter pub add emojis

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

emojis 套件為 Dart 應用程式提供對 Unicode 13.0 表情符號的完整支援。它包含 2020 年發布的所有標準表情符號,讓開發者能輕鬆地在多個平台整合與顯示表情符號。此套件非常適合需要豐富文字格式、訊息介面或具表現力的使用者介面之應用程式。透過簡單的匯入,開發者即可存取表情符號資料,並在字串、元件或自訂繪製邏輯中使用。它輕巧且維護良好,原始碼可於 GitHub 上取得,以確保透明度並支援貢獻。

適用情境

  • 訊息應用
  • 使用者介面增強
  • 富文本內容
  • 社群媒體功能
  • 遊戲化元素

主要特色

  • 完整的 Unicode 13.0 表情符號支援
  • 跨平台相容性
  • 透過 pub 實現輕鬆整合
  • 原始碼公開可用
  • 輕量且快速

適合對象

  • 行動應用程式開發人員
  • Web 應用程式創建者
  • UI/UX 設計師
  • 教育類應用
  • 互動式聊天介面

使用建議

  • 不包含表情符號皮膚或變體
  • 無內建表情符號選擇器
  • 僅限靜態表情符號資料
  • 需要手動處理表情符號的渲染
  • 無本地化支援

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Emojis

🔥 Emoji for Dart 🔥 Over 3900 Emojis
This 📦 contain all 🆕 Unicode 17.0 Emojis (2️⃣0️⃣2️⃣5️⃣) 💪 supports null safety 💪

🛠️ Usage

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.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);
// (💰, 💴, 💵, 💶, 💷, 💸, 💳, 🧾, 💹)

🚀 Features

  • [x] All Present unicode emojis 💯.
  • [x] Get Emojis by Name, Category, Keyword & ...
  • [x] Modify Emoji with 🆕 skin color ( 🏻 🏼 🏽 🏾 🏿 ).
  • [x] Stabilize Emoji (No Skin color, No Gender).
  • [x] Assemble Emojis (👩 + ❤ + 👩 = 👩‍❤️‍👩 ).
  • [x] Disassemble Emojis (👨‍🔧 = 🔧 + 🧑).
  • [x] Emoji Regex Pattern.
  • [ ] Emojize and Demojize text.
  • [ ] Find emojis in text.
  • [ ] Replace emojis in text.

📄 License

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案