相关疑难解决方法(0)

如何在文本字段中颤动的值末尾设置光标位置?

问题是我想在文本字段的值末尾添加“,00”在 iOS 设备中效果很好,但在 android 中光标移动到文本字段中值的起点。所以,我无法添加“,00”。

flutter

74
推荐指数
9
解决办法
4万
查看次数

TextFormField 向后输入值 [Flutter]

正如下面的 GIF 所示,TextFormField我正在使用的是向后输入值。我也将TextDirection属性设置为ltr,但它没有改变任何东西。其他TextFormFields似乎没有这个问题。输入的文本被发送回另一个屏幕Navigator.pop,并以相同的向后有人发送。

奇怪的文本表单字段

导致问题的 textFormField 代码:

TextFormField(
// validator: (String value) {
// return value.isEmpty ? "task must have a name" : null;
// },
    textDirection: TextDirection.ltr,
    maxLength: 100,
    controller: newcontroller, // Just an ordinary TextController
    onChanged: (value) {
        setState(() {
            newcontroller.text = value;
        });
    },
    decoration: InputDecoration(
        errorText: _validate  // Just a boolean value set to false by default
                   ? 'Value Can\'t Be Empty' : null,
        labelText: "name …
Run Code Online (Sandbox Code Playgroud)

textfield direction flutter

4
推荐指数
1
解决办法
7334
查看次数

标签 统计

flutter ×2

direction ×1

textfield ×1