提交 8f35a9ab authored 作者: Kevin's avatar Kevin

修复Release版弹出键盘后返回上页后无法打开自定义键盘

上级 9cb76004
......@@ -13,6 +13,7 @@ CupertinoPopoverButton({
BoxConstraints popoverConstraints,
this.onTap,
this.transitionDuration=const Duration(milliseconds: 200),
this.barrierColor = Colors.black54,
this.radius=8.0});
```
......
......@@ -140,7 +140,7 @@ class CoolKeyboard {
static hideKeyboard({bool animation=true}){
if(_keyboardEntry != null && _pageKey != null) {
_keyboardHeight = null;
_pageKey.currentState.animationController.addStatusListener((status) {
_pageKey.currentState.animationController.addStatusListener((AnimationStatus status) {
if (status == AnimationStatus.dismissed ||
status == AnimationStatus.completed) {
if (_keyboardEntry != null) {
......@@ -333,6 +333,10 @@ class KeyboardPageState extends State<KeyboardPage> with SingleTickerProviderSta
@override
void dispose() {
super.dispose();
if(animationController.status == AnimationStatus.forward || animationController.status == AnimationStatus.reverse)
{
animationController.notifyStatusListeners(AnimationStatus.dismissed);
}
animationController.dispose();
}
......
......@@ -17,7 +17,6 @@ class KeyboardMediaQueryState extends State<KeyboardMediaQuery >{
// TODO: implement build
var data = MediaQuery.of(context);
print('KeyboardMediaQuery${CoolKeyboard.keyboardHeight}');
// TODO: implement build
return MediaQuery(
child: widget.child,
......
name: cool_ui
description: Some practical Widget for flutter,Popover,Weui,Custom Keyboard
version: 0.1.14
version: 0.1.15
author: Kevin <liangkaikevin@gmail.com>
homepage: https://github.com/Im-Kevin/cool_ui
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论