emojis
emojis copied to clipboard
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!
Awesome, please open a PR
Sounds good!
Another question -- where did you source your list of keywords for each emoji? You have a lot of keywords.
emojipedia, emojicodes, uemoji, onemoji ... every where ;)
I've been working on a source generator and just noticed that you seem to have one gitignored. Are you possibly able to share that logic?
yes, I can share it with you after my voyage which will end in 4, 5 days.
Is this still worked on?
Is this still worked on?
2022 🦾, Emoji v14 maybe 🤷♂️