Skip to main content

avoid-cubits

added in: 1.2.0
warning

Warns when a Cubit is used.

It's recommended to avoid Cubits if you want to scale your codebase, since Cubits might look like a good way to stat, but they scale badly.

Example

❌ Bad:

// LINT
class CounterCubit extends Cubit<int> {
CounterCubit() : super(0);
}

✅ Good:

// Use Bloc instead