Did you know?
Since Riverpod 2.6.0, all generated providers can be declared with a Ref
argument.
The old [ProviderName]Ref
syntax is deprecated.
To upgrade existing projects, simply run: dart run custom_lint --fix
. 👍
Note: in order to update all providers in your codebase, custom_lint
needs to be installed and configured:
# pubspec.yaml
dev_dependencies:
custom_lint: 0.7.0
riverpod_lint: 2.6.2
# analysis_options.yaml
analyzer:
plugins:
- custom_lint
Once this is done, run: dart run custom_lint --fix
.
Happy coding!