当我单击远离文本字段时,它会颤抖地关闭键盘,但是光标会继续在文本字段中闪烁。我该如何阻止这种情况的发生?
TextField(
decoration: InputDecoration(
border: InputBorder.none,
suffixIcon: IconButton(
alignment: Alignment.topRight,
icon: Icon(Icons.check),
onPressed: () {
setState(() {
args.collection.notes[index] =
noteControllers[index].text;
});
},
),
),
keyboardType: TextInputType.multiline,
maxLines: null,
controller: noteControllers[index]
..text = args.collection.notes[index],
onChanged: (text) => {args.collection.notes[index] = text},
),
有问题的文本字段