prefer-provider-extensions
Suggests using context.read() or context.watch() instead of Provider.of(context).
Using context extensions is shorter, helps you keep the codebase consistent and makes it less likely to forget listen: false when read behavior is expected.
Example
❌ Bad:
// LINT: Prefer 'context.watch' instead of 'Provider.of'.
Provider.of(context);
// LINT: Prefer 'context.watch' instead of 'Provider.of'.
Provider.of<String>(context);
// LINT: Prefer 'context.read' instead of 'Provider.of(listen: false)'.
Provider.of<String>(context, listen: false);
✅ Good:
context.watch();
context.read();