emojis 0.8.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 75

Emojis #

๐Ÿ”ฅ Emoji for Dart ๐Ÿ”ฅ Over 3200 Emojis
This ๐Ÿ“ฆ contain all ๐Ÿ†• Unicode 12.1 Emojis (2๏ธ0๏ธ2๏ธ0๏ธ)

๐Ÿ› ๏ธ Usage #

0๏ธโƒฃ Import

import 'package:emojis/emojis.dart'; // to use Emoji collection
import 'package:emojis/emoji.dart'; // to use Emoji utilities

1๏ธโƒฃ Use

var message = 'Made with ${Emojis.redHeart} by Naji.'; // message: Made with โค๏ธ by Naji.

Emoji smile = Emoji.byName('Grinning Face'); // get a emoji by its name
print(smile.name);
// 'Grinning Face' name of emoji
print(smile.char);
// '๐Ÿ˜€' character of emoji
print(smile.emojiGroup);
// EmojiGroup.smileysEmotion group of emoji
print(smile.emojiSubgroup);
// EmojiSubgroup.faceSmiling sub group of emoji

var womanBlond = Emoji.byChar(Emojis.womanBlondHair); // get a emoji by its character ๐Ÿ‘ฑโ€โ™€๏ธ

var blondyBlackLady = womanBlond.newSkin(fitzpatrick.dark); // get blondy in black 
print(blondyBlackLady); // ๐Ÿ‘ฑ๐Ÿฟโ€โ™€๏ธ

var emList = Emoji.all(); // list of all Emojis 

print(Emoji.disassemble(Emojis.mechanic)); // ['๐Ÿ”ง', '๐Ÿง‘']

print(Emoji.assemble([Emojis.man, Emojis.man, Emojis.girl, Emojis.boy])); // ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๏ธ

print(Emoji.modify('๐Ÿ‘', fitzpatrick.light)); // ๐Ÿ‘๐Ÿป

print(Emoji.stabilize(Emojis.womanPoliceOfficerMediumDarkSkinTone)); //๐Ÿ‘ฎ๐Ÿพโ€โ™€๏ธ => ๐Ÿ‘ฎโ€โ™€๏ธ Woman Police Officer with no special skin tone
print(Emoji.stabilize(Emojis.womanPoliceOfficerMediumDarkSkinTone, skin: false, gender: true)); //๐Ÿ‘ฎ๐Ÿพโ€โ™€๏ธ => ๐Ÿ‘ฎ no gender! still medium dark

Emoji.byKeyword('love'); // returns list of lovely emojis :) 
// (๐Ÿฅฐ, ๐Ÿ˜, ๐Ÿ˜˜, ๐Ÿ˜š, ๐Ÿ˜™, ๐Ÿค—, ๐Ÿ˜ป, ๐Ÿ˜ฝ, ๐Ÿ’‹, ๐Ÿ’Œ, ๐Ÿ’˜, ๐Ÿ’, ๐Ÿ’–, ๐Ÿ’—, ๐Ÿ’“, ๐Ÿ’ž, ๐Ÿ’•, ..., ๐Ÿ’„, โ™พ)

print(Emoji.byGroup(EmojiGroup.foodDrink)); // returns emojis in Food and Drink group
// (๐Ÿ‡, ๐Ÿˆ, ๐Ÿ‰, ๐ŸŠ, ๐Ÿ‹, ๐ŸŒ, ๐Ÿ, ๐Ÿฅญ, ๐ŸŽ, ๐Ÿ, ๐Ÿ, ๐Ÿ‘, ๐Ÿ’, ๐Ÿ“, ๐Ÿฅ, ๐Ÿ…, ๐Ÿฅฅ, ๐Ÿฅ‘, ...)

print(Emoji.bySubgroup(EmojiSubgroup.money)); // returns emojis in Money subgroup
// (๐Ÿ’ฐ, ๐Ÿ’ด, ๐Ÿ’ต, ๐Ÿ’ถ, ๐Ÿ’ท, ๐Ÿ’ธ, ๐Ÿ’ณ, ๐Ÿงพ, ๐Ÿ’น)

๐Ÿš€ Features #

[ ] Emojize and Demojize text
[ ] Find emojis in text
[ ] Replace emojis in text

๐Ÿ“„ License #

[0.8.1] #

  • Remove generator
  • Use last stable version unicode 12.1
  • Add library emoji and remove alias.

[0.0.1] #

  • Emojis class contains all released emojis (v13)

example/main.dart

import 'package:emojis/emojis.dart';
import 'package:emojis/emoji.dart';

main() {
  print('I ${Emojis.greenHeart} ${Emojis.directHit}'); // I ๐Ÿ’š ๐ŸŽฏ

  Emoji smile = Emoji.byName('Grinning Face'); // get a emoji by its name
  print(smile.name);
// 'Grinning Face' name of emoji
  print(smile.char);
// '๐Ÿ˜€' character of emoji
  print(smile.emojiGroup);
// EmojiGroup.smileysEmotion group of emoji
  print(smile.emojiSubgroup);
// EmojiSubgroup.faceSmiling sub group of emoji

  var womanBlond = Emoji.byChar(Emojis.womanBlondHair); // get a emoji by its character ๐Ÿ‘ฑโ€โ™€๏ธ

  var blondyBlackLady = womanBlond.newSkin(fitzpatrick.dark); // get blondy in black
  print(blondyBlackLady); // ๐Ÿ‘ฑ๐Ÿฟโ€โ™€๏ธ

  var emList = Emoji.all(); // list of all Emojis

  print(Emoji.disassemble(Emojis.mechanic)); // ['๐Ÿ”ง', '๐Ÿง‘']

  print(Emoji.assemble([Emojis.man, Emojis.man, Emojis.girl, Emojis.boy])); // ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๏ธ

  print(Emoji.modify('๐Ÿ‘', fitzpatrick.light)); // ๐Ÿ‘๐Ÿป

  print(Emoji.stabilize(Emojis.womanPoliceOfficerMediumDarkSkinTone)); //๐Ÿ‘ฎ๐Ÿพโ€โ™€๏ธ => ๐Ÿ‘ฎโ€โ™€๏ธ Woman Police Officer with no special skin tone
  print(Emoji.stabilize(Emojis.womanPoliceOfficerMediumDarkSkinTone, skin: false, gender: true)); //๐Ÿ‘ฎ๐Ÿพโ€โ™€๏ธ => ๐Ÿ‘ฎ no gender! still medium dark

  Emoji.byKeyword('love'); // returns list of lovely emojis :)
  // (๐Ÿฅฐ, ๐Ÿ˜, ๐Ÿ˜˜, ๐Ÿ˜š, ๐Ÿ˜™, ๐Ÿค—, ๐Ÿ˜ป, ๐Ÿ˜ฝ, ๐Ÿ’‹, ๐Ÿ’Œ, ๐Ÿ’˜, ๐Ÿ’, ๐Ÿ’–, ๐Ÿ’—, ๐Ÿ’“, ๐Ÿ’ž, ๐Ÿ’•, ..., ๐Ÿ’„, โ™พ)

  print(Emoji.byGroup(EmojiGroup.foodDrink)); // returns emojis in Food and Drink group
  // (๐Ÿ‡, ๐Ÿˆ, ๐Ÿ‰, ๐ŸŠ, ๐Ÿ‹, ๐ŸŒ, ๐Ÿ, ๐Ÿฅญ, ๐ŸŽ, ๐Ÿ, ๐Ÿ, ๐Ÿ‘, ๐Ÿ’, ๐Ÿ“, ๐Ÿฅ, ๐Ÿ…, ๐Ÿฅฅ, ๐Ÿฅ‘, ...)

  print(Emoji.bySubgroup(EmojiSubgroup.money)); // returns emojis in Money subgroup
  // (๐Ÿ’ฐ, ๐Ÿ’ด, ๐Ÿ’ต, ๐Ÿ’ถ, ๐Ÿ’ท, ๐Ÿ’ธ, ๐Ÿ’ณ, ๐Ÿงพ, ๐Ÿ’น)
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  emojis: ^0.8.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:emojis/emojis.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
55
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
75
Learn more about scoring.

We analyzed this package on Apr 3, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/src/emoji.dart. (-1.99 points)

Analysis of lib/src/emoji.dart reported 4 hints:

line 46 col 123: Use = to separate a named parameter from its default value.

line 119 col 61: Use = to separate a named parameter from its default value.

line 179 col 52: Use = to separate a named parameter from its default value.

line 179 col 70: Use = to separate a named parameter from its default value.

Format lib/src/unicode_emojis.dart.

Run dartfmt to format lib/src/unicode_emojis.dart.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: -15 stdout: Exceeded timeout of 0:10:00.000000 parsing /tmp/pub-dartlang-dartdocKOLRFD/pkg/lib/emoji.dart... parsing /tmp/pub-dartlang-dartdocKOLRFD/pkg/lib/emojis.dart... parsing /dart-sdk/lib/core/core.dart... parsing /dart-sdk/lib/collection/collection.dart... parsing /dart-sdk/lib/internal/internal.dart... parsing /dart-sdk/lib/async/async.dart... parsing /dart-sdk/lib/convert/convert.dart... parsing /dart-sdk/lib/typed_data/typed_data.dart... parsing /dart-sdk/lib/math/math.dart... parsing /tmp/pub-dartlang-dartdocKOLRFD/pkg/lib/src/emoji.dart... parsing /tmp/pub-dartlang-dartdocKOLRFD/pkg/lib/src/unicode_emojis.dart... parsing /dart-sdk/lib/developer/developer.dart... parsing /dart-sdk/lib/isolate/isolate.dart... parsing /dart-sdk/lib/ffi/ffi.dart... parsing /dart-sdk/lib/html/dart2js/html_dart2js.dart... parsing /dart-sdk/lib/html/html_common/html_common_dart2js.dart... parsing /dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_names.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/rti.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/recipe_syntax.dart... parsing /dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart... parsing /dart-sdk/lib/html/html_common/metadata.dart... parsing /dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart... parsing /dart-sdk/lib/svg/dart2js/svg_dart2js.dart... parsing /dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart... parsing /dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart... parsing /dart-sdk/lib/_http/http.dart... parsing /dart-sdk/lib/io/io.dart... parsing /dart-sdk/lib/js/dart2js/js_dart2js.dart... parsing /dart-sdk/lib/js/_js.dart... parsing /dart-sdk/lib/mirrors/mirrors.dart... parsing /dart-sdk/lib/html/dartium/nativewrappers.dart... parsing /dart-sdk/lib/cli/cli.dart... parsing /dart-sdk/lib/wasm/wasm.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart... Initialized dartdoc with 41 libraries in 36.7 seconds documenting emojis Generating docs for library emoji from package:emojis/emoji.dart... Generating docs for library emojis from package:emojis/emojis.dart... Validating docs... stderr: Exceeded timeout of 0:10:00.000000 Documenting emojis... warning: emoji has no library level documentation comments, from emoji: (file:///tmp/pub-dartlang-dartdocKOLRFD/pkg/lib/emoji.dart:1:9) warning: no canonical library found for emoji.Emoji.hashCode, not linking, from emoji.Emoji.hashCode: (file:///dart-sdk/lib/core/object.dart:94:20) warning: no canonical library found for emoji.Emoji.runtimeType, not linking, from emoji.Emoji.runtimeType: (file:///dart-sdk/lib/core/object.dart:116:21) warning: no canonical library found for emoji.Emoji.noSuchMethod, not linking, from emoji.Emoji.noSuchMethod: (file:///dart-sdk/lib/core/object.dart:111:20) warning: no canonical library found for emoji.Emoji.==, not linking, from emoji.Emoji.==: (file:///dart-sdk/lib/core/object.dart:62:26) warning: unresolved doc reference [skinTone], from emoji.Emoji.stabilize: (file:///tmp/pub-dartlang-dartdocKOLRFD/pkg/lib/src/emoji.dart:179:17) warning: emojis has no library level documentation comments, from emojis: (file:///tmp/pub-dartlang-dartdocKOLRFD/pkg/lib/emojis.dart:1:9) warning: no canonical library found for emojis.Emojis.toString, not linking, from emojis.Emojis.toString: (file:///dart-sdk/lib/core/object.dart:99:19)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.10.0