body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
// 触摸收起键盘
FocusScope.of(context).requestFocus(FocusNode());
},
child: ...
)
body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
// 触摸收起键盘
FocusScope.of(context).requestFocus(FocusNode());
},
child: ...
)
本文标题:flutter 点击空白处收回软键盘
本文链接:https://www.haomeiwen.com/subject/sjmlgktx.html
网友评论