flutter点击空白处收起键盘

body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
// 触摸收起键盘
FocusScope.of(context).requestFocus(FocusNode());
},
child: ...
)

你可能感兴趣的:(flutter点击空白处收起键盘)