Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

README

        


⚠️ Attention: This repository has been moved to https://github.com/felangel/bloc and is now read-only!


Cubit


build
coverage
Star on GitHub
Discord
License: MIT
Starware

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. ⭐