avoid-existing-instances-in-bloc-provider
Warns when a BlocProvider
returns an existing instance instead of creating a new one.
Example
❌ Bad:
final existing = RegularService();
BlocProvider(
create: () => existing, // LINT: Avoid returning existing instances from 'BlocProvider'.
dispose: (value) => value.dispose(),
);
✅ Good:
BlocProvider(
create: () => RegularService(),
dispose: (value) => value.dispose(),
);