validator_lint
Features
Lint that informs the user when a TextFormField has no validator.
Getting started
Installation
-
Add
validator_lintandcustom_lintas a dev dependency in your project'spubspec.yaml.dart pub add validator_lint custom_lint --dev -
In your
analysis_options.yamladdinclude: package:validator_lint/analysis_options.yaml. You might want to exclude some files (e.g generated json serializable) from analysis. -
Enable the
custom_lintanalyzer plugin inanalysis_options.yaml. You can customize lint rules by adding acustom_lintconfig with arulessection. -
Run
flutter pub getin your project main directory and restart your IDE. You're ready to go!
Usage
Example analysis_options.yaml:
custom_lint:
rules:
- validator_lint: true
analyzer:
plugins:
# Required for our custom lints support
- custom_lint
exclude:
- '**/*.g.dart'