JeffG05/emoji_picker

Feature request: Option to hide the recent page would be nice

Opened this issue · 2 comments

The recent section does not work well. It would be nice to have a disable option

I will try to make a PR for this soon, but it seems like the maintainer is not working on it any more. I made couple of PR 2 weeks ago, but no comments on it yet.

Hello, I finded a temporary solution for this issue.

like above:
import 'package:emoji_picker/emoji_picker.dart' as emoji;

Create a GlobalKey:
final key = new GlobalKey<State<emoji.EmojiPicker>>();

Final code like above:

Widget buildSticker() {
    picker = emoji.EmojiPicker(
      key: key,
      bgColor: ColorsConst.bg,
      indicatorColor: ColorsConst.primary,
      selectedCategory: emoji.Category.RECENT,
      rows: 3,
      columns: 7,
      buttonMode: emoji.ButtonMode.MATERIAL,
      recommendKeywords: [],
      numRecommended: 10,
      onEmojiSelected: (emoji, category) {
        (key.currentState as dynamic).addRecentEmoji(emoji);
        //createState().addRecentEmoji(emoji);
      },
    );
    return picker;
  }