'Flutter how to hide the autofill options in a TextFormField on flutter-web/iOS
I have a simple Widget, containing a single TextFormField
class TestLayout extends StatelessWidget {
TestLayout({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(children: [
TextFormField(),
]);
}
}
But when I deploy this on a webserver and access the site from my iPhone, I get the following (see screenshot below):
Note the additional line with autofill related items above the keyboard (password, creditcard and address items and the corresponding 'done' button). How can I get rid of this line?
Solution 1:[1]
Have you tried to set the keyboardType property to visiblePassword along with enableSuggestions propertie setted to false?
Something like this should fix:
TextFormField(
enableSuggestions: false,
keyboardType: TextInputType.visiblePassword
),
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

