addEmojiToRecentlyUsed method

Future<void> addEmojiToRecentlyUsed({
  1. required GlobalKey<EmojiPickerState> key,
  2. required Emoji emoji,
  3. Config config = const Config(),
})

Add an emoji to recently used list or increase its counter

Implementation

Future<void> addEmojiToRecentlyUsed({
  required GlobalKey<EmojiPickerState> key,
  required Emoji emoji,
  Config config = const Config(),
}) async {
  return EmojiPickerInternalUtils()
      .addEmojiToRecentlyUsed(emoji: emoji, config: config)
      .then((recentEmojiList) =>
          key.currentState?.updateRecentEmoji(recentEmojiList));
}