Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable predictive text in TextField of Flutter?

I want to disable predictive text which comes in the keyboard of a textfield. It is not so difficult in native android and IOS but I have not found a solution in a Flutter.

I have tried using autocorrect: false and changing keyboardtypes but it is not working.

TextField(
          autocorrect: false,
          keyboardType: TextInputType.emailAddress,
          decoration: new InputDecoration(hintText: "Enter text"),
          autofocus: true,
        ),
like image 505
sk_462 Avatar asked Mar 14 '19 07:03

sk_462


1 Answers

If neither enableSuggestions nor autocorrect can solve the problem, try setting keyboardType to TextInputType.visiblePassword.

like image 200
Spatz Avatar answered Sep 27 '22 19:09

Spatz