【发布时间】:2022-06-24 20:51:40
【问题描述】:
我试图在系统键盘显示时隐藏表情符号键盘,反之亦然。我目前拥有的是当系统键盘打开然后我点击表情符号图标,表情符号键盘显示在系统键盘顶部,如下所示:
我正在使用emoji_picker_flutter: ^1.1.2 包,这里是代码:
Offstage(
offstage: !emojiShowing,
child: Padding(
padding: const EdgeInsets.all(10),
child: SizedBox(
height: 250,
child: EmojiPicker(
onEmojiSelected: (Category category, Emoji emoji) {
_onEmojiSelected(emoji);
},
onBackspacePressed: _onBackspacePressed,
config: Config(
columns: 8,
// Issue: https://github.com/flutter/flutter/issues/28894
emojiSizeMax: 32 * (Platform.isIOS ? 1.30 : 1.0),
verticalSpacing: 0,
horizontalSpacing: 0,
initCategory: Category.SMILEYS,
bgColor: Theme.of(context).scaffoldBackgroundColor,
indicatorColor: Colors.blue,
iconColor: Colors.grey,
iconColorSelected: Colors.blue,
progressIndicatorColor: Colors.blue,
backspaceColor: Colors.blue,
skinToneDialogBgColor: Colors.white,
skinToneIndicatorColor: Colors.grey,
enableSkinTones: true,
showRecentsTab: true,
recentsLimit: 28,
noRecentsText: 'No Recents',
noRecentsStyle: const TextStyle(
fontSize: 20, color: Colors.black26),
tabIndicatorAnimDuration: kTabScrollDuration,
categoryIcons: const CategoryIcons(),
buttonMode: ButtonMode.MATERIAL)),
),
),
),
有什么解决办法吗?
【问题讨论】: