Bloc
A predictable state management library that helps implement the BLoC design pattern
Install / Use
/learn @felangel/BlocREADME
A predictable state management library that helps implement the BLoC design pattern.
| Package | Pub |
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| angular_bloc | |
| bloc |
|
| bloc_concurrency |
|
| bloc_lint |
|
| bloc_test |
|
| bloc_tools |
|
| flutter_bloc |
|
| hydrated_bloc |
|
| replay_bloc |
|
Sponsors
Our top sponsors are shown below! [Become a Sponsor]
<table style="background-color: white; border: 1px solid black"> <tbody> <tr> <td align="center" style="border: 1px solid black"> <a href="https://shorebird.dev"><img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/sponsors/shorebird.png" width="225"/></a> </td> <td align="center" style="border: 1px solid black"> <a href="https://getstream.io/chat/flutter/tutorial/?utm_source=Github&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Github_Jan2022_FlutterChat&utm_term=bloc"><img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/sponsors/stream.png" width="225"/></a> </td> <td align="center" style="border: 1px solid black"> <a href="https://rettelgame.com/"><img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/sponsors/rettel.png" width="225"/></a> </td> </tr> </tbody> </table>Overview
<img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/diagrams/bloc_architecture.png" width="500" alt="Bloc Architecture"></img>
The goal of this library is to make it easy to separate presentation from business logic, facilitating testability and reusability.
Documentation
- Official Documentation
- Angular Bloc Package
- Bloc Package
- Bloc Concurrency Package
- Bloc Lint Package
- Bloc Test Package
- Bloc Tools Package
- Flutter Bloc Package
- Hydrated Bloc Package
- Replay Bloc Package
Migration
Examples
<div style="text-align: center"> <table> <tr> <td style="text-align: center"> <a href="https://bloclibrary.dev/tutorials/flutter-counter"> <img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/examples/flutter_counter.gif" width="200"/> </a> </td> <td style="text-align: center"> <a href="https://bloclibrary.dev/tutorials/flutter-infinite-list"> <img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/examples/flutter_infinite_list.gif" width="200"/> </a> </td> <td style="text-align: center"> <a href="https://bloclibrary.dev/tutorials/flutter-login"> <img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/examples/flutter_firebase_login.gif" width="200" /> </a> </td> </tr> <tr> <td style="text-align: center"> <a href="https://bloclibrary.dev/tutorials/github-search"> <img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/examples/flutter_github_search.gif" width="200"/> </a> </td> <td style="text-align: center"> <a href="https://bloclibrary.dev/tutorials/flutter-weather"> <img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/examples/flutter_weather.gif" width="200"/> </a> </td> <td style="text-align: center"> <a href="https://bloclibrary.dev/tutorials/flutter-todos"> <img src="https://raw.githubusercontent.com/felangel/bloc/master/assets/examples/flutter_todos.gif" width="200"/> </a> </td> </tr> </table> </div>Dart
- Counter - an example of how to create a
CounterBloc(pure dart).
Flutter
- Counter - an example of how to create a
CounterBlocto implement the classic Flutter Counter app. - Form Validation - an example of how to use the
blocandflutter_blocpackages to implement form validation. - Bloc with Stream - an example of how to hook up a
blocto aStreamand update the UI in response to data from theStream. - Complex List - an example of how to manage a list of items and asynchronously delete items one at a time using
blocandflutter_bloc. - Infinite List - an example of how to use the
blocandflutter_blocpackages to implement an infinite scrolling list. - Login Flow - an example of how to use the
blocandflutter_blocpackages to implement a Login Flow. - Firebase Login - an example of how to use the
blocandflutter_blocpackages to implement login via Firebase. - Github Search - an examp
