bloc_template
A mason brick for implementing BLoC architecture in your Flutter project.
Prerequisites
Latest versions of equatable, flutter_bloc and http
Usage š
mason make bloc_template --name AppName --bloc_name BlocName
Note:
It's advised to implement the brick inside the root directory of your
Flutter project as the template generates the 'lib' folder with all code files.
To add this brick globally in your local machine from git url with git path, execute the following command:
mason add -g bloc_template --git-url https://github.com/rijalsandeshraj/mason_bricks --git-path bricks/bloc_template
Variables āØ
variable | description | default | type |
---|---|---|---|
name | name of the project | App | string |
bloc_name | name of the bloc | App | string |
Output š¦
āāā lib
ā āāā blocs
ā ā āāā app
ā ā āāā app_bloc.dart
ā ā āāā app_event.dart
ā ā āāā app_state.dart
ā āāā constants
ā ā āāā api_endpoints.dart
ā ā āāā colors.dart
ā ā āāā text_styles.dart
ā āāā data
ā ā āāā api_providers
ā ā ā āāā app_api_provider.dart
ā ā āāā models
ā ā ā āāā model.dart
ā ā āāā repositories
ā ā ā āāā app_repository.dart
ā ā āāā api_services.dart
ā āāā utils
ā ā āāā extensions.dart
ā ā āāā navigator.dart
ā ā āāā show_custom_snack_bar.dart
ā āāā views
ā ā āāā screens
ā ā ā āāā home_screen.dart
ā ā ā āāā login_screen.dart
ā ā ā āāā splash_screen.dart
ā ā āāā widgets
ā ā ā āāā custom_app_bar.dart
āāā āāā main.dart