Add enableSuggestions flag to TextField and TextFormField#42550
Add enableSuggestions flag to TextField and TextFormField#42550justinmc merged 7 commits intoflutter:masterfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
77b290f to
ac19374
Compare
|
Dude, you are doing the great job!!!! God bless your soul.. |
|
No problem! 🎉 I'm trying to figure out some tests for this and then it should be ready for code review. |
|
Is |
|
I think it would be better to state it in the positive, rather than be consistent with a (IMO) bad API. |
|
Thanks @jonahwilliams, I'm on board with that. I'll plan to change it to |
|
@justinmc How is your work going? Is it possible to get your commits in near future?:) |
|
Sorry for the delay! I'm changing the name to |
| final bool autocorrect; | ||
|
|
||
| /// {@template flutter.services.textInput.enableSuggestions} | ||
| /// Whether to hide suggestions. |
There was a problem hiding this comment.
Could we provide a brief explanation of what "suggestions" actually are?
| /// {@template flutter.services.textInput.enableSuggestions} | ||
| /// Whether to hide suggestions. | ||
| /// | ||
| /// This flag only affects Android. On iOS, suggestions are tied directly to |
There was a problem hiding this comment.
Maybe link "Android" to the native doc that describes the feature we depend on.
|
What's the status on this? |
|
Just waiting for the build to be green so I can merge this. I just verified with the engine on master that this branch works and passes the flag correctly, so everything is good to go. |
|
What version are you using? I think this is in v1.16.3 and above. |
Latest version 1.17.0, i updated it last night |
|
Hmm thanks for checking. Does the flag |
I didn't tested it in native android but i use SwiftKey in my physical device it's the same |
|
any hint how to make it work? I really need it in my project UPDATE: used keyboardType: TextInputType.visiblePassword for now it does what I want.. |
|
See this comment: #22828 (comment) If your problem is the same as that, then it might not be possible to achieve even on native Android. If Flutter is missing something that native has we can look into adding support, though. |
|
FWIW setting This issue #22828 outlines the issue but was closed after this was merged RE this 👇 :
That DOES work but on Android it disables the microphone... which is undesirable |

Description
Currently there is no direct control over the
TYPE_TEXT_FLAG_NO_SUGGESTIONSflag in Android. This PR adds aenableSuggestionsflag to all types of text fields to control this Android flag.Related Issues
Closes #22828
Closes #41758
Depends on engine PR: flutter/engine#13099
Tests
Testing that the property is set and that it goes to the engine correctly. I don't think there's a more thorough way to test that.