updateRecentEmoji method

void updateRecentEmoji(
  1. List<RecentEmoji> recentEmoji, {
  2. bool refresh = false,
})

Update recentEmoji list from outside using EmojiPickerUtils

Implementation

void updateRecentEmoji(List<RecentEmoji> recentEmoji,
    {bool refresh = false}) {
  _recentEmoji = recentEmoji;
  _categoryEmoji[0] = _categoryEmoji[0]
      .copyWith(emoji: _recentEmoji.map((e) => e.emoji).toList());
  if (mounted && refresh) {
    setState(() {});
  }
}