flutter_form_builder
flutter_form_builder copied to clipboard
[FormBuilderTextField]: <Incorrect keyboard type>
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.
Expected Behavior
Probably because of the new version of flutter.
Steps To Reproduce
- F5 to run Flutter
Aditional information
No response
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
I think I also encountered this problem, have you solved it?
the same problem
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 nativeTextFormField
(what I did) - use flutter below Flutter 3.16.x
If someone can open a PR for this, I will review (and appreciate). Thanks
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
Thanks a million.
there is a temporary way. TextInputType.streetAddress
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
.
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