Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felangel/cubit
Cubit is a lightweight state management solution. It is a subset of the bloc package that does not rely on events and instead uses methods to emit new states.
https://github.com/felangel/cubit
dart dart-library dart-package dartlang flutter flutter-package state-management stream
Last synced: 8 days ago
JSON representation
Cubit is a lightweight state management solution. It is a subset of the bloc package that does not rely on events and instead uses methods to emit new states.
- Host: GitHub
- URL: https://github.com/felangel/cubit
- Owner: felangel
- License: mit
- Archived: true
- Created: 2020-06-04T05:17:27.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-09T03:40:50.000Z (over 4 years ago)
- Last Synced: 2025-01-01T09:05:17.026Z (29 days ago)
- Topics: dart, dart-library, dart-package, dartlang, flutter, flutter-package, state-management, stream
- Language: Dart
- Homepage: https://pub.dev/packages/cubit
- Size: 2.99 MB
- Stars: 596
- Watchers: 23
- Forks: 27
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
⚠️ Attention: This repository has been moved to https://github.com/felangel/bloc and is now read-only!
Cubit is a lightweight state management solution. It is a subset of the [bloc package](https://pub.dev/packages/bloc) that does not rely on events and instead uses methods to emit new states.
## Usage
```dart
class CounterCubit extends Cubit {
CounterCubit() : super(0);void increment() => emit(state + 1);
void decrement() => emit(state - 1);
}
```## Packages
| Package | Pub |
| --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| [cubit](https://github.com/felangel/cubit/tree/master/packages/cubit) | [![pub package](https://img.shields.io/pub/v/cubit.svg)](https://pub.dev/packages/cubit) |
| [cubit_test](https://github.com/felangel/cubit/tree/master/packages/cubit_test) | [![pub package](https://img.shields.io/pub/v/cubit_test.svg)](https://pub.dev/packages/cubit_test) |
| [flutter_cubit](https://github.com/felangel/cubit/tree/master/packages/flutter_cubit) | [![pub package](https://img.shields.io/pub/v/flutter_cubit.svg)](https://pub.dev/packages/flutter_cubit) |
| [angular_cubit](https://github.com/felangel/cubit/tree/master/packages/angular_cubit) | [![pub package](https://img.shields.io/pub/v/angular_cubit.svg)](https://pub.dev/packages/angular_cubit) |
| [hydrated_cubit](https://github.com/felangel/cubit/tree/master/packages/hydrated_cubit) | [![pub package](https://img.shields.io/pub/v/hydrated_cubit.svg)](https://pub.dev/packages/hydrated_cubit) |
| [replay_cubit](https://github.com/felangel/cubit/tree/master/packages/replay_cubit) | [![pub package](https://img.shields.io/pub/v/replay_cubit.svg)](https://pub.dev/packages/replay_cubit) |## Documentation
- [Cubit Package](https://github.com/felangel/cubit/tree/master/packages/cubit/README.md)
- [Cubit Test Package](https://github.com/felangel/cubit/tree/master/packages/cubit_test/README.md)
- [Flutter Cubit Package](https://github.com/felangel/cubit/tree/master/packages/flutter_cubit/README.md)
- [Angular Cubit Package](https://github.com/felangel/cubit/tree/master/packages/angular_cubit/README.md)
- [Hydrated Cubit Package](https://github.com/felangel/cubit/tree/master/packages/hydrated_cubit/README.md)
- [Replay Cubit Package](https://github.com/felangel/cubit/tree/master/packages/replay_cubit/README.md)## Dart Versions
- Dart 2: >= 2.7.0
## Maintainers
- [Felix Angelov](https://github.com/felangel)
## Supporters
[![Very Good Ventures](https://raw.githubusercontent.com/felangel/cubit/master/assets/vgv_logo.png)](https://verygood.ventures)
## Starware
Cubit is Starware.
This means you're free to use the project, as long as you star its GitHub repository.
Your appreciation makes us grow and glow up. ⭐