Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.31 KB

File metadata and controls

61 lines (42 loc) · 1.31 KB

Declaring Riverpod Providers with Ref

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.


Previous Next
What does flutter pub upgrade do? Apple Small Business Program