Emoji for Dart

Related tags

UI emojis
Overview

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

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

  • 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

Comments
  • Showing the emojis in the App

    Showing the emojis in the App

    Seems like the examples are only demonstrating how to print the emojis to the console, which is super inconsequential. How do you include the elements in the actual UI of the app? Seems like the Emoji type is not a Widget type, so I can't just pass it into the tree. Any clarification would be great.

    opened by EightRice 1
  • Use all Unicode emojis as default emojis

    Use all Unicode emojis as default emojis

    It would be great if this library coud make the app use the Unicode emoji as default emoji, like this one : https://unicode.org/emoji/charts/full-emoji-list.html#1f600

    Or maybe there is already a way to use those emojis as default when we display a Text widget for instance ?

    opened by icodeyou 1
  • Add Emojinize and Demojinize

    Add Emojinize and Demojinize

    Implementation

    • Reformat codes by dart-fmt
    • Split code into files (emoji_const.dart, emoji_util.dart, emojis.dart)
    • Fix Emoji.byShortName
    • Add Emoji.emojinize, Emoji.demojinize
    • Add test code
    • Update example/main.dart
    • Update README

    Check

    • flutter analyze passed
    • flutter test passed
    opened by nukotsuka 1
  • Bugfix/search with invalid emoji name

    Bugfix/search with invalid emoji name

    Thank you for creating this package, I am using it to find emojis by name :)

    One issue I stumbled across is that if the name is invalid, then an exception will be raised.

    Thus

    final emoji = Emoji.byName('bla');
    

    will raise the exception:

    Bad state: No element
    dart:collection                      ListMixin.firstWhere
    

    This can be easily fixed by supplying an orElse parameter to firstWhere:

    /// Returns Emoji by [name]
    factory Emoji.byName(String name){
        name = name.toLowerCase(); // todo: searchable name
        return _emojis.firstWhere((Emoji emoji) => emoji.name == name, orElse: () => null);
    }
    

    You also may wish to update byChar, byShortName etc.

    opened by defuncart 1
  • Errors displaying the emojis

    Errors displaying the emojis

    Seems like in each category there are some emojis that aren't displayed properly and the emoji is replaced with a rectangle. This happens for each emoji category: Screen Shot 2020-12-31 at 4 29 01 PM Is this a known issue?

    opened by dancb10 3
  • Modify API to more closely mirror Flutter's Icon/IconData classes

    Modify API to more closely mirror Flutter's Icon/IconData classes

    I want to suggest that some of the core classes in this library be slightly restructured to more closely mimic Flutter's Icon and IconData classes.

    For example, the current API looks like this:

    Emoji womanBlond = Emoji.byChar(Emojis.womanBlondHair);
    print(womanBlond)
    // ๐Ÿ‘ง
    

    The proposed API would look like:

    Emoji womanBlond = Emoji(Emojis.womanBlondHair);
    

    This library would then have 3 core classes:

    /// Houses majority of the API that developers touch. All of your existing methods would stay here
    /// plus new ones like `emojize` and `demojize`.
    class Emoji {}
    
    /// Empty class but for its many constants representing all of the emojis. This would be most similar
    /// to your existing `_emojis` list.
    class Emojis {
      ...
      static const womanBlondHair = EmojiData('\u{1F471}\u{200D}\u{2640}\u{FE0F}', shortName: 'blond-haired_woman', emojiGroup: EmojiGroup.peopleBody, emojiSubGroup: EmojiSubGroup.person, keywords: [...])
      ...
    }
    
    /// Class to hold instance data for a specific emoji. Thousands of these would exist to populate
    /// the `Emojis` container class.
    class EmojiData {
      final String code;
      final String shortName;
      final EmojiGroup emojiGroup;
      final EmojiSubGroup emojiSubGroup;
      final List<String> keywords;
    }
    

    If this seems reasonable, I would be happy to put together a PR. I have lots of emoji functionality I would love to contribute to your library, but wanted to float my ideas for a refactor before diving right in and making changes.

    Thanks again for creating emojis -- you have a lot of very cool functionality here!

    opened by craiglabenz 7
Owner
Naji
A Marine Eng. ;)
Naji
This Dart package offers developers a streamlined library of Flutter widgets, useful for expanding widgets and text views, when users interact with them.

This Dart package offers developers a streamlined library of Flutter widgets, useful for expanding widgets and text views, when users interact with them.

Jesรบs Rodrรญguez 44 Dec 6, 2022
A vector tile renderer for use in creating map tile images or writing to a canvas. Written in Dart to enable use of vector tiles with Flutter.

vector_tile_renderer A vector tile renderer for use in creating map tile images or writing to a canvas. Written in Dart to enable use of vector tiles

David Green 30 Oct 7, 2022
Connecting the Windows platform with the beautiful Dart language.

This is project in a very experimental stage Connecting the Windows platform with the beautiful Dart language. Can be used inside or without flutter a

ilopX 11 Oct 24, 2022
Implementation of the adwaita theme for flutter/dart

Implementation of the adwaita color scheme found in libadwaita. Inspired by the yaru theme for flutter. Usage import 'package:flutter/material.dart';

GTK Flutter 30 Oct 25, 2022
A Dart package that detects credit card types based on their prefixes

credit_card_type_detector | Credit Card Type Detector A Dart package that detects credit card types based on the current credit card number patterns T

Tanner Davis 22 Jan 4, 2023
App that simulates an e-commerce of natural products with Flutter and Dart

E-commerce Orgs App que simula um e-commerce de produtos naturais para o curso de navegaรงรฃo e rotas com nuvigator atravรฉs do Flutter e Dart. ?? Funcio

Heliomar P. Marques 1 Feb 18, 2022
Flutter + Dart (App development)

mi_card A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Yogesh Narendra Tiwari 1 Dec 14, 2021
Flutter-business-card-app - Flutter + Dart business card mobile app

Dart + Flutter Business Card Mobile Application

Mark Hellner 1 Nov 8, 2022
Emoji for Dart

Emojis ?? Emoji for Dart ?? Over 3300 Emojis This ?? contain all ?? Unicode 13.1 Emojis ( 2๏ธโƒฃ 0๏ธโƒฃ 2๏ธโƒฃ 1๏ธโƒฃ ) ?? supports null safety ?? ??๏ธ Usage 0๏ธโƒฃ I

Naji 40 Jan 1, 2023
๐Ÿ‘‰ A light-weight Emoji ๐Ÿ“ฆ for Flutter and Dart-based applications with all up-to-date emojis ๐Ÿ˜„. Made from ๐Ÿ’ฏ% โ˜• with โค๏ธ!

flutter_emoji ?? A light-weight Emoji ?? for Flutter and Dart-based applications with all up-to-date emojis ?? . Made from ?? % โ˜• with โค๏ธ ! Inspired f

Pete Houston 67 Nov 4, 2022
A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.

emoji_picker_flutter Yet another Emoji Picker for Flutter ?? Note: This package is based on emoji_picker which has been deprecated and not maintained

Stefan Humm 99 Dec 24, 2022
Flutter package to get keyboard height. Can be used to display a sticker/emoji modal with correct height.

flutter_persistent_keyboard_height Flutter package to get keyboard height. The height is persisted during app sessions and keyboard states (you can us

Arshak Aghakaryan 13 Oct 17, 2022
A Flutter package that provides an Emoji Keyboard widget.

Flutter Choose Keyboard A Flutter package that provides an Emoji Keyboard widget. BASED IN: https://github.com/JeffG05/emoji_picker Key Features Flutt

null 1 Oct 22, 2021
Ejimo - Comprehensive emoji and symbol picker.

Ejimo Find and copy unicode characters, emoticons, glyphs and symbols with Ejimo. Ejimo is a comprehensive emoji and symbol piker that puts every char

null 20 Dec 19, 2022
A Custom Emoji Keyboard For Flutter

before clone the GitHub repository please give a star on the repository. Mobile

Blackshadow Software Ltd 14 Nov 21, 2022
Image Editor Plugin with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories.

ImageEditorPro Image Editor Plugin with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories. To start w

Zeeshan 206 Dec 2, 2022
Image editing using Paints, Text, Filters, Emoji and Sticker like stories, Built With Flutter

ImageEditorPro Image Editor Plugin with simple, easy support for image editing u

Kaushikkumar Godhani 4 Nov 13, 2022
A Dart build script that downloads the Protobuf compiler and Dart plugin to streamline .proto to .dart compilation.

A Dart build script that downloads the Protobuf compiler and Dart plugin to streamline .proto to .dart compilation.

Julien Scholz 10 Oct 26, 2022
Mysql.dart - MySQL client for Dart written in Dart

Native MySQL client written in Dart for Dart See example directory for examples

null 48 Dec 29, 2022