flutter_form_builder icon indicating copy to clipboard operation
flutter_form_builder copied to clipboard

[FormBuilderTextField]: <Incorrect keyboard type>

Open Mhee777 opened this issue 1 year ago • 10 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Package/Plugin version

9.1.1

Platforms

  • [X] Android
  • [ ] iOS
  • [ ] Linux
  • [ ] MacOS
  • [ ] Web
  • [ ] Windows

Flutter doctor

Flutter doctor
[√] Flutter (Channel stable, 3.16.2, on Microsoft Windows [Version 10.0.22631.2715], locale th-TH)
    • Flutter version 3.16.2 on channel stable at D:\Flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9e1c857886 (3 days ago), 2023-11-30 11:51:18 -0600
    • Engine revision cf7a9d0800
    • Dart version 3.2.2
    • DevTools version 2.28.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Mhee\AppData\Local\Android\Sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = C:\Users\Mhee\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

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

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.2)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.6.33723.286
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.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 17.0.6+0-b2043.56-10027231)

[√] VS Code (version 1.84.2)
    • VS Code at C:\Users\Mhee\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.78.0

[√] Connected device (4 available)
    • ELE L29 (mobile)  • 53F5T19329000101 • android-arm64  • Android 10 (API 29)
    • Windows (desktop) • windows          • windows-x64    • Microsoft Windows [Version 10.0.22631.2715]
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 119.0.6045.200
    • Edge (web)        • edge             • web-javascript • Microsoft Edge 119.0.2151.93

[√] Network resources
    • All expected network resources are available.

• No issues found!

Minimal code example

Code sample
 FormBuilderTextField(
   name: 'forumTitle',
   maxLength: 140,
   controller: controller.forumTitlecontroller.value,
   focusNode: controller.titleFocusNode,
   decoration: customInput(hintText: VariableText.question),
   style: NotoSansThai.textInput.copyWith(color: Palette.black),
 ),

Current Behavior

Incorrect keyboard type Many numeric types can be used, but many character types become TextInputType.visiblePassword. Screenshot_20231204_062528_com vetcaare app

Expected Behavior

Probably because of the new version of flutter.

Steps To Reproduce

  1. F5 to run Flutter

Aditional information

No response

Mhee777 avatar Dec 03 '23 23:12 Mhee777

I think I've encountered the same issue.

Using TextField with the same parameters displays the correct keyboard type, but when switched to FormBuilderTextField, it shows the wrong keyboard type.

Additionally, this issue started from Flutter 3.16.x; it worked fine in Flutter 3.10.x

LianYangCn avatar Dec 04 '23 03:12 LianYangCn

I think I also encountered this problem, have you solved it?

ahua666 avatar Dec 07 '23 09:12 ahua666

the same problem

dennis-tealseed avatar Dec 15 '23 16:12 dennis-tealseed

This is VERY CRITICAL. All of my android users cannot input Japanese and I have received a lot of bug reports...

Tried to change attributes but didn't work.

Choices are

  • stop using FormBuilderTextField and use the native TextFormField (what I did)
  • use flutter below Flutter 3.16.x

kumasan3 avatar Dec 18 '23 12:12 kumasan3

If someone can open a PR for this, I will review (and appreciate). Thanks

deandreamatias avatar Dec 18 '23 16:12 deandreamatias

I tried to modify and test the source code and found that changing the 'enableSuggestions' field to the default true is feasible. Because the default value of 'enableSuggestions' in TextField of Flutter3.16. x is true, In version 9.1.1, the default value of 'enableSuggestions' is false. hope I can help you

PP-bat avatar Dec 19 '23 09:12 PP-bat

Thanks a million.

LianYangCn avatar Dec 20 '23 04:12 LianYangCn

there is a temporary way. TextInputType.streetAddress

SUNbrightness avatar Dec 23 '23 14:12 SUNbrightness

I found this issue. When enableSuggestions is set to false in the TextField of Flutter 3.16.x, it seems that non-English keyboards become unavailable. Until this issue is resolved, it seems necessary to set enableSuggestions to true.

sakuraidayo avatar Jan 24 '24 01:01 sakuraidayo

I had a problem where the keyboard would appear but swipe didn't work, only individual key presses.

Setting enableSuggestions to true fixed this for me

jhaglund avatar Jan 29 '24 22:01 jhaglund