mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
## Description
This PR fixes an issue where setting `TextField.enableSuggestions` to false was not honored on Android.
Several Android devices (Samsung) and/or IMEs (including GBoard) does not disabled suggestions when `InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS `flag is set. The common solution is to rely on the following flag: ~~`InputType.TYPE_TEXT_VARIATION_PASSWORD`~~ `InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD`.
Reference:
- https://issuetracker.google.com/issues/36934423#comment4
- https://stackoverflow.com/questions/33148168/inputtype-type-text-flag-no-suggestions-in-samsung/33227237#33227237
- Existing comment on the codebase:
195a313245/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java (L270)
## Related Issue
Fixes https://github.com/flutter/flutter/issues/71679.
## Tests
Adds 1 test.