Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhmzdev/blocpod
An experimental framework to play with
https://github.com/mhmzdev/blocpod
Last synced: 16 days ago
JSON representation
An experimental framework to play with
- Host: GitHub
- URL: https://github.com/mhmzdev/blocpod
- Owner: mhmzdev
- Created: 2023-09-03T10:50:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-03T11:26:14.000Z (over 1 year ago)
- Last Synced: 2024-10-30T04:52:14.684Z (2 months ago)
- Language: Dart
- Size: 302 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## BlocPod
BlocPod - I'm very poor with naming stuff, I just extracted this as a mix of `bloc` + `provider` = `blocpod`Just an experimental framework that I'm playing around. Overall its a mix of `provider` and `flutter_bloc`. Overall `provider` is being used as state for each screen (viewModel if you are a stacked person) and `flutter_bloc` is mainly used for business logic.
### Project Structure
- _template
- This the most important folder here, as I work with `bloc` using 4 layers:
- `cubit.dart`
- `state.dart`
- `repository.dart`
- `data_provider.dart`
- So, this is powered with `hygen` (npm package) that helps me in generating all the boilerplate code.
- screen
- cubits
- providers- configs
- Controls the app theming, spaces, typography etc.
- `extensions` might be put here as well
- cubits
- Since I'm a `cubit/state` person not an `event/state` so all the cubits goes here.
- It will have simple and nested cubits (both)
- models
- All the application global model classes will be used here.
- I have some local models as well e.g. `bottom_bar/item_model.dart`
- providers
- `ChangeNotifier` that will be used all across the apps will be here
- If a `ChangeNotifier` is specifically managing state of a screen it will be put in `screen/screen_name/_state.dart`
- router
- This manages the overall navigation of the app with help of `configs/extension/_string.dart` where an extension is written for `String` class and I mostly prefer named Navigation.
- services
- All the services goes here e.g. Api, AppCache service etc.
- ui
- animations
- painters
- screens
- `screen_name.dart`
- `_state.dart`
- If some widgets are required only at one screen the will be put in `screen/widgets/` folder
- widgets
- core
- design
- headless
- uitls
- I'm putting some helper function here, utils functions
- snackbars
- dialogs
- assets etc.