A building block to easily create feature folders using the Clean Architecture approach.
Generated by mason ๐งฑ
This is a starting point for a new brick. A few resources to get you started if this is your first brick template:
Make sure you have Mason installed. If you don't have it installed, follow the installation guide to get started.
Once you have Mason installed, you can add the clean_architecture_feature brick to your Mason configuration by adding the following code to your mason.yaml file:
bricks:
clean_architecture_feature: 0.0.1
To use the clean_architecture_feature brick, you can run the following command in your terminal:
mason make clean_architecture_feature
The following table outlines the variables that can be used when generating a new feature folder:
Variable | Description | Required | Type |
---|---|---|---|
feature_name |
๐ท๏ธ Name of the feature | Yes |
string |
use_bloc |
๐งฑ Determine if you need BLoC for the feature or not | Yes |
bool |
The generated folder architecture will look like this:
lib/
โโโ features
โย ย โโโ featureName
โย ย โย ย โโโ data
โย ย โย ย โย ย โโโ datasources
โย ย โย ย โย ย โโโ feature_name_remot_source.dart
โย ย โย ย โย ย โโโ models
โย ย โย ย โย ย โโโ feature_name_network.dart
โย ย โย ย โย ย โโโ repositories
โย ย โย ย โย ย โโโ feature_name_repository_impl.dart
โย ย โย ย โโโ domain
โย ย โย ย โย ย โโโ repositories
โย ย โย ย โย ย โโโ feature_name_repository.dart
โย ย โย ย โย ย โโโ usecases
โย ย โย ย โย ย โโโ feature_name_use_case.dart
โย ย โย ย โโโ presentation
โย ย โย ย โโโ bloc
โย ย โย ย โย ย โโโ feature_name_bloc.dart
โย ย โย ย โโโ widget
โย ย โย ย โย ย โโโ feature_name_widget.dart
MIT License
Copyright (c) 2023 Jigar Fumakiya
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.