flutterdartkeyboardtextfieldautocorrect

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

Solution

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