Skip to main content

avoid-missing-controller

added in: 1.15.0
Pro+
preset: recommended

Warns when a TextFormField, TextField or EditableText does not have at least one way to get the updated value.

Example

❌ Bad:

TextFormField(); // LINT

✅ Good:

TextFormField(controller: TextEditingController());
TextFormField(onChanged: (_) {});