0

我有一台三星 Tab S2 版本 7 安卓平板电脑。

我在EditableText小部件中找不到任何解决此错误的方法。

发生的情况是,在具有各自TextEditingController的TextFormField小部件中,我输入了我的用户名,但是当我更改键盘上的字符来搜索它时,我需要这个字符“_”...我收到此错误.. .

颤振医生-v

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [version 10.0.19044.1466], locale fr-FR)
    • Flutter version 2.8.1 at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (7 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\Daniel ROLDAN\AppData\Local\Android\Sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = C:\Users\Daniel ROLDAN\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.63.2)
    • VS Code at C:\Users\Daniel ROLDAN\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.32.0

[√] Connected device (3 available)
    • SM T813 (mobile) • 3b8bea59055e2627 • android-arm64  • Android 7.0 (API 24)
    • Chrome (web)     • chrome           • web-javascript • Google Chrome 93.0.4577.63
    • Edge (web)       • edge             • web-javascript • Microsoft Edge 96.0.1054.62

• No issues found!

在此处输入图像描述

在此处输入图像描述

这是代码...

TextEditingController accountController = TextEditingController();

   Padding(
      padding: EdgeInsets.fromLTRB(20, 0, 20, 0),
      child: TextFormField(
        scrollPadding: EdgeInsets.only(
          bottom: Device.screenHeight * 0.25,
        ),
        controller: accountController ,
        textInputAction:
            widget.isPassword ? TextInputAction.done : TextInputAction.next,
        onFieldSubmitted: () {},
        enableSuggestions: !widget.isPassword,
        autocorrect: !widget.isPassword,
        obscureText: widget.isPassword && this.isPasswordHidden!,
        validator: () {},
        style: TextStyle(
          fontSize: 20,
        ),
        decoration: InputDecoration(
          suffixIcon: IconButton(
                  icon: Icon(
                    Icons.visibility_off,
                    size: 30,
                    color: DesignConstants.loginFontColor,
                  ),
                  onPressed: (){},
                  splashRadius: 10,
                ),
          hintText: widget.labelText,
          helperText: widget.helperText,
        ),
      ),
    )
4

0 回答 0