1.0.3 β€’ Published 10 months ago

unicode-emoji-dart v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Unicode Emoji Dart

This library takes the latest available emoji dataset (v15.1) from Unicode and generates Dart objects from it. It uses the following libraries to compile the dataset:

Generate Dart files

As repo clone

  1. git clone https://github.com/alfalcon90/unicode-emoji-dart.git Clone this repo.

  2. npm install Install dependencies.

  3. npm run generate Check the/export folder once the script is done.

As npm dependency

  1. npm add unicode-emoji-dart Add this package.

  2. npm add -D @types/node typescript Add Typescript devDependencies if not done already.

  3. npm explore unicode-emoji-dart -- npm run generate Check thenode_modules/unicode-emoji-dart/export folder once the script is done.

Usage

  // Emoji Map
  emojis.length; // 1870 emojis

  // Emoji class
  final emoji = emojis['πŸ‡¨πŸ‡Ί']!;

  emoji.char; // 'πŸ‡¨πŸ‡Ί'
  emoji
      .keywords; // ['flag_cuba','cu','flag','nation','country','banner','cuba']
  emoji.name; // 'flag Cuba'
  emoji.slug; // 'flag_cuba'
  emoji.group; // EmojiGroup.flags
  emoji.emojiVersion; // 2.0
  emoji.unicodeVersion; // 2.0
  emoji.skinToneSupport; // false
  emoji.skinToneSupportUnicodeVersion; // null

  // Equality
  final other = emojis['πŸ‡ΊπŸ‡Έ']!;
  emoji == other; // false

  // Regex
  regex.hasMatch('Loud noises! πŸ“£'); // true

Unicode License Agreement

https://www.unicode.org/license.html

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

11 months ago