chore: Fix keyboard
This commit is contained in:
parent
ac45ec9402
commit
da56d7fb79
2 changed files with 11 additions and 6 deletions
|
|
@ -428,16 +428,19 @@ class ChatController extends State<Chat> {
|
|||
}
|
||||
|
||||
void emojiPickerAction() {
|
||||
if (showEmojiPicker) {
|
||||
inputFocus.requestFocus();
|
||||
} else {
|
||||
inputFocus.unfocus();
|
||||
}
|
||||
emojiPickerType = EmojiPickerType.keyboard;
|
||||
setState(() => showEmojiPicker = !showEmojiPicker);
|
||||
_inputFocusListener();
|
||||
}
|
||||
|
||||
void _inputFocusListener() {
|
||||
if (showEmojiPicker) {
|
||||
inputFocus.unfocus();
|
||||
} else {
|
||||
inputFocus.requestFocus();
|
||||
if (showEmojiPicker && inputFocus.hasFocus) {
|
||||
emojiPickerType = EmojiPickerType.keyboard;
|
||||
setState(() => showEmojiPicker = false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue