class S2 extends StatefulWidget {
@override
_S2State createState() => _S2State();
}
class _S2State extends State<S2> {
TextEditingController keyController = new TextEditingController();
我的 TextEditingController 如上
Flexible(
child: TextField(
// autofocus: true,
controller: keyController,
style: TextStyle(color: text1),
autocorrect: false,
decoration: InputDecoration(
enabledBorder: UnderlineInputBorder(
borderSide:
BorderSide(color: borderUnfocused)),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: borderFocused),
),
),
)),
我已经使用了上面的文本字段。
当我触摸 TextField 时我的键盘一直隐藏有什么原因?