https://github.com/merrit/unicode_emojis
Unicode emojis with metadata, search and skin tone support.
https://github.com/merrit/unicode_emojis
dart dataset emojis
Last synced: 11 months ago
JSON representation
Unicode emojis with metadata, search and skin tone support.
- Host: GitHub
- URL: https://github.com/merrit/unicode_emojis
- Owner: Merrit
- License: mit
- Created: 2023-05-29T20:48:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-13T21:12:09.000Z (about 2 years ago)
- Last Synced: 2025-04-12T10:59:16.568Z (11 months ago)
- Topics: dart, dataset, emojis
- Language: Dart
- Homepage: https://pub.dev/packages/unicode_emojis
- Size: 105 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# unicode_emojis 🎉
A Dart package that gives you all the Unicode emojis, skin tone variants, and
search. The data is generated from the awesome
[emoji-data](https://github.com/iamcal/emoji-data) repository, so it will always
be fresh and up to date. 🙌
## Features
- Contains over 3,000 emojis from Unicode 15.0. 😍
- Supports skin tone variations for human emojis and multi-person emojis. 🙋🏻♂️🙋🏼♀️🙋🏽♂️🙋🏾♀️🙋🏿♂️
- Provides an `Emoji` class that has all the info you need for each emoji. 🚀
- Access everything through the `UnicodeEmojis` class. 🎉
- The `UnicodeEmojis.allEmojis` constant contains all the emojis. 📦
- The `UnicodeEmojis.search` function finds the emojis that match your query. 🔎
- Search by name, short name (e.g. `tada`), category (e.g. `flags`),
subcategory (e.g. `country-flag`), or ASCII representation (e.g. `;)`).
## Usage
To use this package, add `unicode_emojis` as a dependency in your `pubspec.yaml` file.
Then import it in your Dart code:
```dart
import 'package:unicode_emojis/unicode_emojis.dart';
```
Here's a quick example:
```dart
import 'package:unicode_emojis/unicode_emojis.dart';
void main(List args) {
// You can access the list of all emojis using the `allEmojis` constant.
const emojis = UnicodeEmojis.allEmojis;
// Print the first 10 emojis.
print(emojis.take(10).map((e) => e.emoji).toList());
// => [😀, 😃, 😄, 😁, 😆, 😅, 🤣, 😂, 🙂, 🙃]
// Search for emojis that contain the word "blue".
final blueEmojis = UnicodeEmojis.search('blue');
print(blueEmojis.map((e) => e.emoji).toList());
// => [💙, 🩵, 🫐, 🚙, 📘, 🔵, 🟦, 🔷, 🔹]
// Search by short name.
final partyPopper = UnicodeEmojis.search('tada').first;
print(partyPopper);
// =>
// {
// "name": "party popper",
// "emoji": "🎉",
// "unified": "1F389",
// "non_qualified": null,
// "short_name": "tada",
// "short_names": [
// "tada"
// ],
// "text": null,
// "texts": null,
// "category": "Activities",
// "subcategory": "event",
// "sort_order": 1045,
// "added_in": "0.6",
// "has_img_apple": true,
// "has_img_google": true,
// "has_img_twitter": true,
// "has_img_facebook": true,
// "skin_variations": null,
// "obsoletes": null,
// "obsoleted_by": null
// }
// Search by official Unicode name.
final spoutingWhale = UnicodeEmojis.search('spouting whale').first;
print(spoutingWhale.emoji);
// => 🐳
print(spoutingWhale.name);
// => spouting whale
// Get an emoji and its variations.
final wavingEmoji = UnicodeEmojis.search('waving hand').first;
print(wavingEmoji.emoji);
// => 👋
print(wavingEmoji.skinVariations!.map((e) => e.emoji).toList());
// => [👋🏻, 👋🏼, 👋🏽, 👋🏾, 👋🏿]
// Search for emoji by the ASCII representation.
final winkEmoji = UnicodeEmojis.search(';)').first;
print(winkEmoji.emoji);
// => 😉
}
```
For more details, please check out the [API reference](https://pub.dev/documentation/unicode_emojis/latest/).
## License
This package is licensed under the MIT license. See the [LICENSE](LICENSE) file for more information.