How to disable predictive text in TextField of Flutter?

sk_462 picture sk_462 · Mar 14, 2019 · Viewed 8.9k times · Source

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,
        ),

Answer

Spatz picture Spatz · May 1, 2020

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