Closed ko1o closed 4 years ago
能贴代码和例子看看吗
@override
void initState() {
super.initState();
EmojiKeyboard.register();
MoreKeyboard.register();
}
// 初始化自定义键盘
CoolKeyboard.init(cxt);
CupertinoTextField(
controller: _textEditingController,
padding: EdgeInsets.only(
left: 6, top: 2, bottom: 2, right: 6),
focusNode: _textFieldFocunNode,
placeholder: "输入新消息",
maxLines: 10,
textInputAction: TextInputAction.send,
keyboardType:
_keyboardType == ChatKeyboardType.emoji
? EmojiKeyboard.inputType
: (_keyboardType ==
ChatKeyboardType.more
? MoreKeyboard.inputType
: TextInputType.text),
onSubmitted: (value) {
_textEditingController.clear();
_textFieldFocunNode.unfocus();
},
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: Colors.black),
)
),
是怎么不生效,是不会切换,还是说所有的都没有弹出
是会被覆盖掉,后面注册的自定义键盘覆盖了前面自定义注册的键盘。
是不是只有最后注册的键盘可以用
麻烦提供个邮箱 我写了个Demo 私发下 @Im-Kevin
468561207@qq.com 我的代码应该是没有这个Bug的,是不是你两个键盘的inputType填写的是一样的
问题已修复
比如聊天页面有多个自定义键盘,如何支持呢?目前我注册多个键盘 ,并自定义键盘就不生效,麻烦作者有时间看下哈~