https://github.com/kaiumallimon/bloc_practice
This repository contains some flutter state management templates using flutter_bloc package.
https://github.com/kaiumallimon/bloc_practice
bloc flutter flutter-bloc flutter-bloc-pattern state-management
Last synced: 11 months ago
JSON representation
This repository contains some flutter state management templates using flutter_bloc package.
- Host: GitHub
- URL: https://github.com/kaiumallimon/bloc_practice
- Owner: kaiumallimon
- Created: 2024-11-28T03:08:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-28T03:27:44.000Z (over 1 year ago)
- Last Synced: 2024-11-28T04:24:08.746Z (over 1 year ago)
- Topics: bloc, flutter, flutter-bloc, flutter-bloc-pattern, state-management
- Language: C++
- Homepage:
- Size: 265 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flutter-bloc-practice
`flutter_bloc` is a state management library that allow users to seperate their application's business logics from the ui elements.
### Get started with bloc
Run the following command and that's it, you're good to go.
```bash
flutter pub add equatable flutter_bloc # Equatable is a object comparing package, it's a good practice to use equatable with bloc
```
There are two ways `bloc` can be used for local state management.
- Cubit
- Bloc
Cubit is a straightforward process, it directly works on the event. On the other hand, the Bloc process needs a event handler to work with the states.
### Example
There are two examples are available inside the `/lib` folder.
- Counter: Simple application to count with a counter variable. (Both of the cubit and bloc example are available)
- Todo: A todo application created following the bloc, contains bloc states, events.
### Author
[Kaium Al Limon](https://www.facebook.com/lemon.exee)