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

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

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