katzvelraj / bloc_architecture_app

This is going to serve as a startup project for every app that I'll build on by using the BLoC state-management package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

           

BLoC Architecture App

This repository imitate the starting project structure for every flutter applications that I have developed using the BLoC package. I am following the official documentation of this BLoC package for designing the folder structure. For more information on BLoC library I would strongly suggest you to follow their official documentation.

This project contains everything that you will need in order to immediately start developing your bloc-driven application. You can also call this folder structure as Layer-first (features inside layers) design.

About the folder structure

    lib/
    ├── core/
    │   ├── constants/
    │   │   └── strings.dart
    │   ├── exceptions/
    │   │   └── route_exception.dart
    │   └── themes/
    │       └── app_theme.dart
    ├── data/
    │   ├── data_providers/
    │   │   └── data_provider.dart
    │   ├── http/
    │   │   └── http_client.dart
    │   ├── models/
    │   │   └── model.dart
    │   └── repositories/
    │       └── repository.dart
    ├── logic/
    │   ├── bloc/
    │   │   └── bloc.dart
    │   ├── cubit/
    │   │   └── cubit.dart
    │   └── debug/
    │       └── app_bloc_observer.dart
    ├── presentation/
    │   ├── common_widgets/
    │   │   └── common_widgets.dart
    │   ├── router/
    │   │   └── app_router.dart
    │   └── screens/
    │       ├── detail_screen/
    │       │   ├── widgets/
    │       │   │   └── detail_widget.dart
    │       │   └── detail_screen.dart
    │       └── home_screen/
    │           ├── widgets/
    │           │   └── home_widget.dart
    │           └── home_screen.dart
    └── main.dart

You might notice that some files are just dummy (like api.dart, model.dart). They are placed there just for git to take the folder structure into consideration. Leaving those folders empty won't let git to take them into consideration. Since this is mostly a startup project, I was thinking of offering you the standard folder structure from the start. Of course, this may change multiple times, improving every time more and more.

About

This is going to serve as a startup project for every app that I'll build on by using the BLoC state-management package

License:MIT License


Languages

Language:Dart 67.0%Language:HTML 25.1%Language:Swift 5.5%Language:Kotlin 1.9%Language:Objective-C 0.5%