Fintasys / emoji_picker_flutter

A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.
MIT License
154 stars 114 forks source link

Unable to switch emoji panel and keyboard! #133

Closed luohao123 closed 6 months ago

luohao123 commented 1 year ago

I an using onTap for textfield to make it switch, but the quesiton is, the textfiled have a onTapOutside func, which make if I tap outside of the textfiled, the soft keyboard will pops up

luohao123 commented 1 year ago
image
Fintasys commented 1 year ago

It's difficult to provide support without seeing code. Our examples try to cover basic behavior but the switch between keyboard and emoji-picker is not perfect and still can be improved in special circumstances. Let me know if I can help you further in this issue or the issue has been solved already 🙏

arshnirmal commented 7 months ago

I'm using state management here but you can also use setState to change isEmojiShowing value

if (!store.isEmojiShowing) {
  await SystemChannels.textInput.invokeMethod('TextInput.hide');
}

store.isEmojiShowing = !store.isEmojiShowing;

if (store.isEmojiShowing) {
  if (focusNode.hasFocus) {
    focusNode.unfocus();
  }
} else {
  await SystemChannels.textInput.invokeMethod('TextInput.show');
  focusNode.requestFocus();
}
Fintasys commented 6 months ago

I assume this issue has been solved? Please open a new issue if there is an issue still remaining 🙏