GestureDetector( behavior: HitTestBehavior.translucent, onTap: () { // 觸摸收起鍵盤 FocusScope.of(context).requestFocus(FocusNode()); }, child: ******* }
注:必定要放到最外層code