admin管理员组文章数量:1415653
I am experiencing an issue with TextField
in Flutter 3.27.1 while running a desktop application on macOS 15.3.1. When I start typing in a TextField
, the entire text gets selected automatically, causing the next keystroke to overwrite the existing content instead of appending to it.
for reference image is from the app. (.png) how to solve this issue.
steps to reproduce
- Create a Flutter desktop application on macOS.
- Add a simple
TextFormField
widget. - Run the app and type some text in the
TextField
. - Start typing again, and you’ll notice that the existing text is selected automatically, leading to overwriting.
{
TextFieldWidget(
controller: NotificationFormControllers.userSearchController,
bgColor: appColor.pureWhiteAndBlack,
doOnChanged: (text) {
context.read<NotificationControlBloc>().add(UserSearch(
query: text, userList: widget.data.userName.split(',').toList()));
},
hintText: 'Search User',
),
}
本文标签:
版权声明:本文标题:flutter - TextField is automatically selected when start typing, causing the next letter to overwrite the existing text - Stack 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745154243a2645070.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论