提交 292ae50f authored 作者: Kevin's avatar Kevin

修改检测问题

上级 00bf6349
...@@ -44,7 +44,7 @@ class CoolKeyboard { ...@@ -44,7 +44,7 @@ class CoolKeyboard {
return _codec.encodeSuccessEnvelope(null); return _codec.encodeSuccessEnvelope(null);
} else { } else {
if (data != null) { if (data != null) {
return await _sendPlatformMessage("flutter/textinput", data!); return await _sendPlatformMessage("flutter/textinput", data);
} }
} }
break; break;
......
...@@ -28,7 +28,7 @@ class KeyboardMediaQueryState extends State<KeyboardMediaQuery >{ ...@@ -28,7 +28,7 @@ class KeyboardMediaQueryState extends State<KeyboardMediaQuery >{
if(data == null){ if(data == null){
data = MediaQueryData.fromWindow(WidgetsBinding.instance!.window); data = MediaQueryData.fromWindow(WidgetsBinding.instance!.window);
} }
var bottom = CoolKeyboard._keyboardHeightNotifier.value ?? data.viewInsets.bottom; var bottom = CoolKeyboard._keyboardHeightNotifier.value != 0 ? CoolKeyboard._keyboardHeightNotifier.value : data.viewInsets.bottom;
// TODO: implement build // TODO: implement build
return MediaQuery( return MediaQuery(
child: widget.child, child: widget.child,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论