https://github.com/william-franco/bloc-abstraction-example
Example of using BLoC/Cubit in a fully abstracted way in Flutter.
https://github.com/william-franco/bloc-abstraction-example
bloc-cubit feature-first mvvm-architecture repository-pattern solid-principles
Last synced: 8 days ago
JSON representation
Example of using BLoC/Cubit in a fully abstracted way in Flutter.
- Host: GitHub
- URL: https://github.com/william-franco/bloc-abstraction-example
- Owner: william-franco
- License: mit
- Created: 2025-01-13T20:07:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-22T23:06:27.000Z (3 months ago)
- Last Synced: 2026-03-23T17:38:23.854Z (3 months ago)
- Topics: bloc-cubit, feature-first, mvvm-architecture, repository-pattern, solid-principles
- Language: Dart
- Homepage:
- Size: 180 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bloc Abstraction Example
Under construction.
## Project Structure
The project is structured in a modular way, where each new functionality should be a new module containing its particularities, and things common to the entire project should be in the `common` module.
## Folder architecture
```
src/
├── common/
│ ├── constants/
│ ├── dependency_injectors/
│ ├── enums/
│ ├── extensions/
│ ├── patterns/
│ ├── routes/
│ ├── services/
│ ├── state_management/
│ └── widgets/
└── features/
├── feature_one/
│ ├── models/
│ ├── repositories/
│ ├── routes/
│ ├── view_models/
│ └── views/
└── feature_two/
├── models/
├── repositories/
├── routes/
├── view_models/
└── views/
```
## Coverage
flutter pub run build_runner build --delete-conflicting-outputs
flutter test --coverage
genhtml coverage/lcov.info -o coverage/html
open coverage/html/index.html
## ScreenShots
| Image 1 | Image 2 | Image 3 |
|----------|----------|----------|
|  |  |  |
| Image 4 | Image 5 | Image 6 |
|----------|----------|----------|
|  |  |  |
## Examples of commits
```
git add . && git commit -m ":rocket: Initial commit." && git push
git add . && git commit -m ":building_construction: Added initial project architecture." && git push
git add . && git commit -m ":building_construction: Update project architecture." && git push
git add . && git commit -m ":memo: Updated project documentation." && git push
git add . && git commit -m ":memo: Updated code documentation." && git push
git add . && git commit -m ":white_check_mark: Added feature xyz." && git push
git add . && git commit -m ":wrench: Fixed xyz usage." && git push
git add . && git commit -m ":heavy_minus_sign: Removed xyz." && git push
git add . && git commit -m ":memo: Adjusted project imports." && git push
git add . && git commit -m ":arrow_up: Updated dependencies." && git push
git add . && git commit -m ":arrow_down: Removed dependencies." && git push
git add . && git commit -m ":wastebasket: Removed unused code." && git push
git add . && git commit -m ":test_tube: Added test functionality xyz." && git push
git add . && git commit -m ":construction_worker: Building in progress." && git push
git add . && git commit -m ":construction_worker: Added CI build system." && git push
```
## License
MIT License
Copyright (c) 2026 William Franco
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.