我是Flutter的新手。我想让文本框中的值始终为大写,但我没有找到相关的资源。
另一个问题是TextField onChanged事件的防抖实现。当我在TextField上输入时,它会立即触发onChanged事件,这对我的目标不太适用。onChange事件将在每次更改文本后的500毫秒后触发。
new TextField(
controller: _controller,
decoration: new InputDecoration(
hintText: 'Search here',
),
onChanged: (str) {
//need to implement debounce
}
)