Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cool_ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
cool_ui
Commits
b28fad3f
提交
b28fad3f
authored
8月 04, 2019
作者:
Kevin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复了多个自定义键盘无法切换的问题
上级
bbc3d000
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
236 行增加
和
121 行删除
+236
-121
CHANGELOG.md
CHANGELOG.md
+3
-0
README.md
README.md
+1
-1
test_keyboard.dart
example/lib/keyboards/test_keyboard.dart
+90
-0
main.dart
example/lib/main.dart
+3
-0
custom_keyboard.dart
example/lib/pages/custom_keyboard.dart
+6
-1
keyboard_manager.dart
lib/keyboards/keyboard_manager.dart
+132
-118
pubspec.yaml
pubspec.yaml
+1
-1
没有找到文件。
CHANGELOG.md
浏览文件 @
b28fad3f
## [0.2.1]
*
TODO: 修复了多个自定义键盘无法切换的问题
## [0.2.0]
*
TODO: 优化了WeuiToast的效果,添加了WeuiToastConfig,可以全局配置默认设置
*
TODO: 添加了Keyboard对android 返回按钮的监听
...
...
README.md
浏览文件 @
b28fad3f
...
...
@@ -9,7 +9,7 @@ Usage Add this to your package's pubspec.yaml file:
Flutter >=1.7
```
yaml
dependencies
:
cool_ui
:
"
^0.2.
0
"
cool_ui
:
"
^0.2.
1
"
```
Flutter < 1.7
...
...
example/lib/keyboards/test_keyboard.dart
0 → 100644
浏览文件 @
b28fad3f
import
'package:cool_ui/cool_ui.dart'
;
import
'package:flutter/material.dart'
;
class
TestKeyboard
extends
StatelessWidget
{
static
const
CKTextInputType
inputType
=
const
CKTextInputType
(
name:
'CKTestKeyboard'
);
static
double
getHeight
(
BuildContext
ctx
){
MediaQueryData
mediaQuery
=
MediaQuery
.
of
(
ctx
);
return
mediaQuery
.
size
.
width
/
3
/
2
*
4
;
}
final
KeyboardController
controller
;
const
TestKeyboard
({
this
.
controller
});
static
register
(){
CoolKeyboard
.
addKeyboard
(
TestKeyboard
.
inputType
,
KeyboardConfig
(
builder:
(
context
,
controller
){
return
TestKeyboard
(
controller:
controller
);
},
getHeight:
TestKeyboard
.
getHeight
));
}
@override
Widget
build
(
BuildContext
context
)
{
MediaQueryData
mediaQuery
=
MediaQuery
.
of
(
context
);
return
Material
(
child:
DefaultTextStyle
(
style:
TextStyle
(
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
black
,
fontSize:
23.0
),
child:
Container
(
height:
getHeight
(
context
),
width:
mediaQuery
.
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xffafafaf
),
),
child:
GridView
.
count
(
childAspectRatio:
2
/
1
,
mainAxisSpacing:
0.5
,
crossAxisSpacing:
0.5
,
padding:
EdgeInsets
.
all
(
0.0
),
crossAxisCount:
3
,
children:
<
Widget
>[
buildButton
(
'A'
),
buildButton
(
'B'
),
buildButton
(
'C'
),
buildButton
(
'D'
),
buildButton
(
'E'
),
buildButton
(
'F'
),
buildButton
(
'G'
),
buildButton
(
'H'
),
buildButton
(
'J'
),
Container
(
color:
Color
(
0xFFd3d6dd
),
child:
GestureDetector
(
behavior:
HitTestBehavior
.
translucent
,
child:
Center
(
child:
Icon
(
Icons
.
expand_more
),),
onTap:
(){
controller
.
doneAction
();
},
),
),
buildButton
(
'0'
),
Container
(
color:
Color
(
0xFFd3d6dd
),
child:
GestureDetector
(
behavior:
HitTestBehavior
.
translucent
,
child:
Center
(
child:
Text
(
'X'
),),
onTap:
(){
controller
.
deleteOne
();
},
),
),
]),
)),
);
}
Widget
buildButton
(
String
title
,{
String
value
}){
if
(
value
==
null
){
value
=
title
;
}
return
Container
(
color:
Colors
.
white
,
child:
GestureDetector
(
behavior:
HitTestBehavior
.
translucent
,
child:
Center
(
child:
Text
(
title
),),
onTap:
(){
controller
.
addText
(
value
);
},
),
);
}
}
example/lib/main.dart
浏览文件 @
b28fad3f
...
...
@@ -6,8 +6,11 @@ import 'package:cool_ui_example/pages/weui_toast_demo.dart';
import
'package:cool_ui/cool_ui.dart'
;
import
'package:flutter/material.dart'
;
import
'keyboards/test_keyboard.dart'
;
void
main
(
){
NumberKeyboard
.
register
();
TestKeyboard
.
register
();
runApp
(
MyApp
());
}
...
...
example/lib/pages/custom_keyboard.dart
浏览文件 @
b28fad3f
import
'package:cool_ui_example/keyboards/test_keyboard.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:cool_ui/cool_ui.dart'
;
...
...
@@ -28,7 +29,7 @@ class CustomKeyboardDemoState extends State<CustomKeyboardDemo>{
body:
ListView
(
children:
<
Widget
>[
TextField
(
keyboardType:
NumberKeyboard
.
inputType
,
keyboardType:
TextInputType
.
text
,
),
Container
(
height:
300.0
,
...
...
@@ -36,6 +37,10 @@ class CustomKeyboardDemoState extends State<CustomKeyboardDemo>{
TextField
(
decoration:
InputDecoration
(
labelText:
'演示键盘弹出后滚动'
),
keyboardType:
NumberKeyboard
.
inputType
,
),
TextField
(
decoration:
InputDecoration
(
labelText:
'多个键盘演示'
),
keyboardType:
TestKeyboard
.
inputType
,
)
],
)
...
...
lib/keyboards/keyboard_manager.dart
浏览文件 @
b28fad3f
part of
cool_ui
;
typedef
GetKeyboardHeight
=
double
Function
(
BuildContext
context
);
typedef
KeyboardBuilder
=
Widget
Function
(
BuildContext
context
,
KeyboardController
controller
);
typedef
KeyboardBuilder
=
Widget
Function
(
BuildContext
context
,
KeyboardController
controller
);
class
CoolKeyboard
{
static
JSONMethodCodec
_codec
=
const
JSONMethodCodec
();
static
KeyboardConfig
_currentKeyboard
;
static
Map
<
CKTextInputType
,
KeyboardConfig
>
_keyboards
=
{};
static
Map
<
CKTextInputType
,
KeyboardConfig
>
_keyboards
=
{};
static
BuildContext
_context
;
static
OverlayEntry
_keyboardEntry
;
static
KeyboardController
_keyboardController
;
static
GlobalKey
<
KeyboardPageState
>
_pageKey
;
static
bool
isInterceptor
=
false
;
static
double
get
keyboardHeight
=>
_keyboardHeight
;
static
double
get
keyboardHeight
=>
_keyboardHeight
;
static
double
_keyboardHeight
;
static
init
(
BuildContext
context
){
static
init
(
BuildContext
context
)
{
_context
=
context
;
interceptorInput
();
}
static
interceptorInput
(){
if
(
isInterceptor
)
return
;
static
interceptorInput
()
{
if
(
isInterceptor
)
return
;
isInterceptor
=
true
;
defaultBinaryMessenger
.
setMockMessageHandler
(
"flutter/textinput"
,
(
ByteData
data
)
async
{
defaultBinaryMessenger
.
setMockMessageHandler
(
"flutter/textinput"
,
(
ByteData
data
)
async
{
var
methodCall
=
_codec
.
decodeMethodCall
(
data
);
switch
(
methodCall
.
method
)
{
switch
(
methodCall
.
method
)
{
case
'TextInput.show'
:
if
(
_currentKeyboard
!=
null
)
{
if
(
_currentKeyboard
!=
null
)
{
openKeyboard
();
return
_codec
.
encodeSuccessEnvelope
(
null
);
}
else
{
}
else
{
return
await
_sendPlatformMessage
(
"flutter/textinput"
,
data
);
}
break
;
case
'TextInput.hide'
:
if
(
_currentKeyboard
!=
null
)
{
if
(
_currentKeyboard
!=
null
)
{
hideKeyboard
();
return
_codec
.
encodeSuccessEnvelope
(
null
);
}
else
{
}
else
{
return
await
_sendPlatformMessage
(
"flutter/textinput"
,
data
);
}
break
;
case
'TextInput.setEditingState'
:
var
editingState
=
TextEditingValue
.
fromJSON
(
methodCall
.
arguments
);
if
(
editingState
!=
null
&&
_keyboardController
!=
null
)
{
var
editingState
=
TextEditingValue
.
fromJSON
(
methodCall
.
arguments
);
if
(
editingState
!=
null
&&
_keyboardController
!=
null
)
{
_keyboardController
.
value
=
editingState
;
return
_codec
.
encodeSuccessEnvelope
(
null
);
}
break
;
case
'TextInput.clearClient'
:
hideKeyboard
(
animation:
true
);
hideKeyboard
(
animation:
true
);
clearKeyboard
();
break
;
case
'TextInput.setClient'
:
var
setInputType
=
methodCall
.
arguments
[
1
][
'inputType'
];
InputClient
client
;
_keyboards
.
forEach
((
inputType
,
keyboardConfig
)
{
if
(
inputType
.
name
==
setInputType
[
'name'
])
{
_keyboards
.
forEach
((
inputType
,
keyboardConfig
)
{
if
(
inputType
.
name
==
setInputType
[
'name'
])
{
client
=
InputClient
.
fromJSON
(
methodCall
.
arguments
);
clearKeyboard
();
_currentKeyboard
=
keyboardConfig
;
_keyboardController
=
KeyboardController
(
client:
client
)..
addListener
((){
var
callbackMethodCall
=
MethodCall
(
"TextInputClient.updateEditingState"
,[
_keyboardController
.
client
.
connectionId
,
_keyboardController
.
value
.
toJSON
()]);
defaultBinaryMessenger
.
handlePlatformMessage
(
"flutter/textinput"
,
_codec
.
encodeMethodCall
(
callbackMethodCall
),
(
data
){
_keyboardController
=
KeyboardController
(
client:
client
)
..
addListener
(()
{
var
callbackMethodCall
=
MethodCall
(
"TextInputClient.updateEditingState"
,
[
_keyboardController
.
client
.
connectionId
,
_keyboardController
.
value
.
toJSON
()
]);
defaultBinaryMessenger
.
handlePlatformMessage
(
"flutter/textinput"
,
_codec
.
encodeMethodCall
(
callbackMethodCall
),
(
data
)
{});
});
});
}
});
if
(
client
!=
null
){
await
_sendPlatformMessage
(
"flutter/textinput"
,
_codec
.
encodeMethodCall
(
MethodCall
(
'TextInput.hide'
)));
if
(
client
!=
null
)
{
await
_sendPlatformMessage
(
"flutter/textinput"
,
_codec
.
encodeMethodCall
(
MethodCall
(
'TextInput.hide'
)));
return
_codec
.
encodeSuccessEnvelope
(
null
);
}
else
{
hideKeyboard
(
animation:
false
);
}
else
{
hideKeyboard
(
animation:
false
);
clearKeyboard
();
}
break
;
}
ByteData
response
=
await
_sendPlatformMessage
(
"flutter/textinput"
,
data
);
ByteData
response
=
await
_sendPlatformMessage
(
"flutter/textinput"
,
data
);
return
response
;
});
}
static
Future
<
ByteData
>
_sendPlatformMessage
(
String
channel
,
ByteData
message
)
{
static
Future
<
ByteData
>
_sendPlatformMessage
(
String
channel
,
ByteData
message
)
{
final
Completer
<
ByteData
>
completer
=
Completer
<
ByteData
>();
ui
.
window
.
sendPlatformMessage
(
channel
,
message
,
(
ByteData
reply
)
{
try
{
...
...
@@ -99,54 +104,55 @@ class CoolKeyboard {
exception:
exception
,
stack:
stack
,
library
:
'services library'
,
context:
ErrorDescription
(
'during a platform message response callback'
),
context:
ErrorDescription
(
'during a platform message response callback'
),
));
}
});
return
completer
.
future
;
}
static
addKeyboard
(
CKTextInputType
inputType
,
KeyboardConfig
config
)
{
static
addKeyboard
(
CKTextInputType
inputType
,
KeyboardConfig
config
)
{
_keyboards
[
inputType
]
=
config
;
}
static
openKeyboard
(){
if
(
_keyboardEntry
!=
null
)
return
;
static
openKeyboard
()
{
if
(
_keyboardEntry
!=
null
)
return
;
_pageKey
=
GlobalKey
<
KeyboardPageState
>();
_keyboardHeight
=
_currentKeyboard
.
getHeight
(
_context
);
KeyboardMediaQueryState
queryState
=
_context
.
ancestorStateOfType
(
const
TypeMatcher
<
KeyboardMediaQueryState
>())
as
KeyboardMediaQueryState
;
KeyboardMediaQueryState
queryState
=
_context
.
ancestorStateOfType
(
const
TypeMatcher
<
KeyboardMediaQueryState
>())
as
KeyboardMediaQueryState
;
queryState
.
update
();
var
tempKey
=
_pageKey
;
_keyboardEntry
=
OverlayEntry
(
builder:
(
ctx
)
{
if
(
_currentKeyboard
!=
null
&&
_keyboardHeight
!=
null
)
{
return
KeyboardPage
(
if
(
_currentKeyboard
!=
null
&&
_keyboardHeight
!=
null
)
{
return
KeyboardPage
(
key:
tempKey
,
child:
Builder
(
builder:
(
ctx
){
return
_currentKeyboard
.
builder
(
ctx
,
_keyboardController
);
child:
Builder
(
builder:
(
ctx
)
{
return
_currentKeyboard
.
builder
(
ctx
,
_keyboardController
);
}),
height:
_keyboardHeight
);
}
else
{
height:
_keyboardHeight
);
}
else
{
return
Container
();
}
});
Overlay
.
of
(
_context
).
insert
(
_keyboardEntry
);
BackButtonInterceptor
.
add
((
_
){
BackButtonInterceptor
.
add
((
_
)
{
CoolKeyboard
.
sendPerformAction
(
TextInputAction
.
done
);
return
true
;
},
zIndex:
1
,
name:
'CustomKeyboard'
);
},
zIndex:
1
,
name:
'CustomKeyboard'
);
}
static
hideKeyboard
({
bool
animation
=
true
})
{
static
hideKeyboard
({
bool
animation
=
true
})
{
BackButtonInterceptor
.
removeByName
(
'CustomKeyboard'
);
if
(
_keyboardEntry
!=
null
&&
_pageKey
!=
null
)
{
if
(
_keyboardEntry
!=
null
&&
_pageKey
!=
null
)
{
_keyboardHeight
=
null
;
_pageKey
.
currentState
.
animationController
.
addStatusListener
((
AnimationStatus
status
)
{
_pageKey
.
currentState
.
animationController
.
addStatusListener
((
AnimationStatus
status
)
{
if
(
status
==
AnimationStatus
.
dismissed
||
status
==
AnimationStatus
.
completed
)
{
if
(
_keyboardEntry
!=
null
)
{
...
...
@@ -155,67 +161,63 @@ class CoolKeyboard {
}
}
});
if
(
animation
)
{
if
(
animation
)
{
_pageKey
.
currentState
.
exitKeyboard
();
}
else
{
}
else
{
_keyboardEntry
.
remove
();
_keyboardEntry
=
null
;
}
}
_pageKey
=
null
;
KeyboardMediaQueryState
queryState
=
_context
.
ancestorStateOfType
(
const
TypeMatcher
<
KeyboardMediaQueryState
>())
as
KeyboardMediaQueryState
;
KeyboardMediaQueryState
queryState
=
_context
.
ancestorStateOfType
(
const
TypeMatcher
<
KeyboardMediaQueryState
>())
as
KeyboardMediaQueryState
;
queryState
.
update
();
}
static
clearKeyboard
(){
static
clearKeyboard
()
{
_currentKeyboard
=
null
;
if
(
_keyboardController
!=
null
)
{
if
(
_keyboardController
!=
null
)
{
_keyboardController
.
dispose
();
_keyboardController
=
null
;
}
}
static
sendPerformAction
(
TextInputAction
action
){
static
sendPerformAction
(
TextInputAction
action
)
{
var
callbackMethodCall
=
MethodCall
(
"TextInputClient.performAction"
,
[
_keyboardController
.
client
.
connectionId
,
action
.
toString
()
]);
defaultBinaryMessenger
.
handlePlatformMessage
(
"flutter/textinput"
,
_codec
.
encodeMethodCall
(
callbackMethodCall
),
(
data
)
{});
[
_keyboardController
.
client
.
connectionId
,
action
.
toString
()]);
defaultBinaryMessenger
.
handlePlatformMessage
(
"flutter/textinput"
,
_codec
.
encodeMethodCall
(
callbackMethodCall
),
(
data
)
{});
}
}
class
KeyboardConfig
{
class
KeyboardConfig
{
final
KeyboardBuilder
builder
;
final
GetKeyboardHeight
getHeight
;
const
KeyboardConfig
({
this
.
builder
,
this
.
getHeight
});
const
KeyboardConfig
({
this
.
builder
,
this
.
getHeight
});
}
class
InputClient
{
class
InputClient
{
final
int
connectionId
;
final
TextInputConfiguration
configuration
;
const
InputClient
({
this
.
connectionId
,
this
.
configuration
});
final
TextInputConfiguration
configuration
;
const
InputClient
({
this
.
connectionId
,
this
.
configuration
});
factory
InputClient
.
fromJSON
(
List
<
dynamic
>
encoded
)
{
return
InputClient
(
connectionId:
encoded
[
0
],
configuration:
TextInputConfiguration
(
inputType:
CKTextInputType
.
fromJSON
(
encoded
[
1
][
'inputType'
]),
obscureText:
encoded
[
1
][
'obscureText'
],
autocorrect:
encoded
[
1
][
'autocorrect'
],
actionLabel:
encoded
[
1
][
'actionLabel'
],
inputAction:
_toTextInputAction
(
encoded
[
1
][
'inputAction'
]),
textCapitalization:
_toTextCapitalization
(
encoded
[
1
][
'textCapitalization'
]),
keyboardAppearance:
_toBrightness
(
encoded
[
1
][
'keyboardAppearance'
])
));
return
InputClient
(
connectionId:
encoded
[
0
],
configuration:
TextInputConfiguration
(
inputType:
CKTextInputType
.
fromJSON
(
encoded
[
1
][
'inputType'
]),
obscureText:
encoded
[
1
][
'obscureText'
],
autocorrect:
encoded
[
1
][
'autocorrect'
],
actionLabel:
encoded
[
1
][
'actionLabel'
],
inputAction:
_toTextInputAction
(
encoded
[
1
][
'inputAction'
]),
textCapitalization:
_toTextCapitalization
(
encoded
[
1
][
'textCapitalization'
]),
keyboardAppearance:
_toBrightness
(
encoded
[
1
][
'keyboardAppearance'
])));
}
static
TextInputAction
_toTextInputAction
(
String
action
)
{
switch
(
action
)
{
case
'TextInputAction.none'
:
...
...
@@ -248,9 +250,8 @@ class InputClient{
throw
FlutterError
(
'Unknown text input action:
$action
'
);
}
static
TextCapitalization
_toTextCapitalization
(
String
capitalization
){
switch
(
capitalization
){
static
TextCapitalization
_toTextCapitalization
(
String
capitalization
)
{
switch
(
capitalization
)
{
case
'TextCapitalization.none'
:
return
TextCapitalization
.
none
;
case
'TextCapitalization.characters'
:
...
...
@@ -264,8 +265,8 @@ class InputClient{
throw
FlutterError
(
'Unknown text capitalization:
$capitalization
'
);
}
static
Brightness
_toBrightness
(
String
brightness
){
switch
(
brightness
)
{
static
Brightness
_toBrightness
(
String
brightness
)
{
switch
(
brightness
)
{
case
'Brightness.dark'
:
return
Brightness
.
dark
;
case
'Brightness.light'
:
...
...
@@ -276,10 +277,11 @@ class InputClient{
}
}
class
CKTextInputType
extends
TextInputType
{
class
CKTextInputType
extends
TextInputType
{
final
String
name
;
const
CKTextInputType
({
this
.
name
,
bool
signed
,
bool
decimal
})
:
super
.
numberWithOptions
(
signed:
signed
,
decimal:
decimal
);
const
CKTextInputType
({
this
.
name
,
bool
signed
,
bool
decimal
})
:
super
.
numberWithOptions
(
signed:
signed
,
decimal:
decimal
);
@override
Map
<
String
,
dynamic
>
toJson
()
{
...
...
@@ -290,26 +292,42 @@ class CKTextInputType extends TextInputType{
};
}
factory
CKTextInputType
.
fromJSON
(
Map
<
String
,
dynamic
>
encoded
)
{
@override
String
toString
()
{
return
'
$runtimeType
('
'name:
$name
, '
'signed:
$signed
, '
'decimal:
$decimal
)'
;
}
bool
operator
==(
Object
target
)
{
if
(
target
is
CKTextInputType
)
{
if
(
this
.
toString
()
==
target
.
toString
())
{
return
true
;
}
}
return
false
;
}
factory
CKTextInputType
.
fromJSON
(
Map
<
String
,
dynamic
>
encoded
)
{
return
CKTextInputType
(
name:
encoded
[
'name'
],
signed:
encoded
[
'signed'
],
decimal:
encoded
[
'decimal'
]
);
decimal:
encoded
[
'decimal'
]);
}
}
class
KeyboardPage
extends
StatefulWidget
{
class
KeyboardPage
extends
StatefulWidget
{
final
Widget
child
;
final
double
height
;
const
KeyboardPage
({
this
.
child
,
this
.
height
,
Key
key
}):
super
(
key:
key
);
const
KeyboardPage
({
this
.
child
,
this
.
height
,
Key
key
})
:
super
(
key:
key
);
@override
State
<
StatefulWidget
>
createState
()
=>
KeyboardPageState
();
State
<
StatefulWidget
>
createState
()
=>
KeyboardPageState
();
}
class
KeyboardPageState
extends
State
<
KeyboardPage
>
with
SingleTickerProviderStateMixin
{
class
KeyboardPageState
extends
State
<
KeyboardPage
>
with
SingleTickerProviderStateMixin
{
AnimationController
animationController
;
Animation
<
double
>
doubleAnimation
;
double
bottom
;
...
...
@@ -318,37 +336,33 @@ class KeyboardPageState extends State<KeyboardPage> with SingleTickerProviderSta
void
initState
()
{
// TODO: implement initState
super
.
initState
();
animationController
=
new
AnimationController
(
duration:
new
Duration
(
milliseconds:
100
),
vsync:
this
)
..
addListener
(()=>
setState
((){}));
doubleAnimation
=
new
Tween
(
begin:
0.0
,
end:
widget
.
height
).
animate
(
animationController
)..
addListener
(()=>
setState
((){}));
animationController
.
forward
(
from:
0.0
);
animationController
=
new
AnimationController
(
duration:
new
Duration
(
milliseconds:
100
),
vsync:
this
)
..
addListener
(()
=>
setState
(()
{}));
doubleAnimation
=
new
Tween
(
begin:
0.0
,
end:
widget
.
height
)
.
animate
(
animationController
)
..
addListener
(()
=>
setState
(()
{}));
animationController
.
forward
(
from:
0.0
);
}
@override
Widget
build
(
BuildContext
context
)
{
return
Positioned
(
child:
IntrinsicHeight
(
child:
widget
.
child
),
bottom:
(
widget
.
height
-
doubleAnimation
.
value
)
*
-
1
);
child:
IntrinsicHeight
(
child:
widget
.
child
),
bottom:
(
widget
.
height
-
doubleAnimation
.
value
)
*
-
1
);
}
@override
void
dispose
()
{
super
.
dispose
();
if
(
animationController
.
status
==
AnimationStatus
.
forward
||
animationController
.
status
==
AnimationStatus
.
reverse
)
{
animationController
.
notifyStatusListeners
(
AnimationStatus
.
dismissed
);
}
if
(
animationController
.
status
==
AnimationStatus
.
forward
||
animationController
.
status
==
AnimationStatus
.
reverse
)
{
animationController
.
notifyStatusListeners
(
AnimationStatus
.
dismissed
);
}
animationController
.
dispose
();
super
.
dispose
();
}
exitKeyboard
(){
exitKeyboard
()
{
animationController
.
reverse
();
}
}
pubspec.yaml
浏览文件 @
b28fad3f
name
:
cool_ui
description
:
Some practical Widget for flutter,Popover,Weui,Custom Keyboard
version
:
0.2.
0
version
:
0.2.
1
author
:
Kevin <liangkaikevin@gmail.com>
homepage
:
https://github.com/Im-Kevin/cool_ui
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论