https://github.com/nicosnicolaou16/sampleblocpatternwithsinglestate
This project is an application that utilizes the BLoC architecture pattern with a single state, Dio for network management, and Drift for local database storage.
https://github.com/nicosnicolaou16/sampleblocpatternwithsinglestate
bloc-architecture bloc-pattern bloc-pattern-single-state dart dio-network-manager drift-database flutter flutter-apps flutter-example
Last synced: 3 months ago
JSON representation
This project is an application that utilizes the BLoC architecture pattern with a single state, Dio for network management, and Drift for local database storage.
- Host: GitHub
- URL: https://github.com/nicosnicolaou16/sampleblocpatternwithsinglestate
- Owner: NicosNicolaou16
- Created: 2023-11-02T21:12:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-14T23:41:33.000Z (about 1 year ago)
- Last Synced: 2025-03-23T06:41:23.629Z (about 1 year ago)
- Topics: bloc-architecture, bloc-pattern, bloc-pattern-single-state, dart, dio-network-manager, drift-database, flutter, flutter-apps, flutter-example
- Language: C
- Homepage:
- Size: 291 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample Bloc Pattern With Single State
[](https://linktr.ee/nicos_nicolaou)
[](https://nicosnicolaou16.github.io/)
[](https://twitter.com/nicolaou_nicos)
[](https://linkedin.com/in/nicos-nicolaou-a16720aa)
[](https://medium.com/@nicosnicolaou)
[](https://androiddev.social/@nicolaou_nicos)
[](https://bsky.app/profile/nicolaounicos.bsky.social)
[](https://dev.to/nicosnicolaou16)
[](https://www.youtube.com/@nicosnicolaou16)
[](https://g.dev/nicolaou_nicos)
This project is an application that utilizes the BLoC architecture pattern with a single state, Dio
for network management, and Drift for local database storage.
# The Project Contain the following technologies and libraries
[Bloc Patterns using single state](https://pub.dev/packages/flutter_bloc) along with repositories
and services, separates business logic, data access, and UI by using streams to handle state and
manage data flow. ([Bloc Pattern Documentation](https://bloclibrary.dev/getting-started/))
[Dio Network Manager](https://pub.dev/packages/dio) is responsible for making requests and
retrieving data from the remote server.
[Drift Database](https://drift.simonbinder.eu/docs/getting-started/) is responsible for saving the
retrieved data from the remote server, querying data from the local database, and supporting offline
functionality. ([Drift Database Documentation](https://pub.dev/packages/drift))
[Cached Network Image](https://pub.dev/packages/cached_network_image) is a package that it is
responsible for loading the images and supports offline functionality.
> [!IMPORTANT]
> Similar project with :point_right: [SampleDriftDatabaseWithBlocPattern](https://github.com/NicosNicolaou16/SampleDriftDatabaseWithBlocPattern) :point_left:
# Versioning
Flutter SDK version: 3.38.5
Dart Version: 3.10.4
# Feeds/Urls/End Point (parsing some data from the response)
## (Links References for Ends Points)
https://github.com/r-spacex/SpaceX-API (GitHub)
https://docs.spacexdata.com/?version=latest (Postman)
# References
https://bloclibrary.dev/#/flutterinfinitelisttutorial
https://bloclibrary.dev/#/gettingstarted
https://bloclibrary.dev/#/fluttertimertutorial?id=flutter-timer-tutorial
https://ppantaleon.medium.com/flutter-blocbuilder-vs-blocconsumer-vs-bloclistener-a4a3ce7bfa9a
https://stackoverflow.com/questions/59188021/why-usually-theres-a-repository-layer-on-bloc-pattern
https://stackoverflow.com/questions/73811123/how-to-stop-dio-get-when-the-internet-is-off
https://stackoverflow.com/questions/61381265/stop-showing-error-from-http-or-dio-request
https://pub.dev/packages/dio#handling-errors