vanilla-stacked-bricks
vanilla-stacked-bricks copied to clipboard
A repository for easily generating well-structured Flutter projects based on the Stacked framework, using Mason Bricks for efficient setup and consistency.
VanillaStackedBricks
This repository contains Mason bricks for clean architecture projects. It includes modules, views, integration tests, services, network components, and more.
Table of Contents
- View Brick
- Integration Test Brick
- Feature/Module Brick
View Brick
Mason Brick to create a new view in already existing feature or a as a new feature.
Setup Brick π
- Install mason_cli:
dart pub global activate mason_cli
- Activate view bricks
- Using
mason add
command
mason add view
--git-url https://github.com/GameOnAnil/vanilla-stacked-bricks.git
--git-path bricks/view
- Add directly to
mason.yaml
bricks:
view:
git:
url: 'https://github.com/GameOnAnil/vanilla-stacked-bricks.git'
path: 'bricks/view'
How to use π
Command Line
mason make view
The you will get prompt
modulename?
filename?
Variables for the Command Line β¨
Variable | Description | Type |
---|---|---|
modulename |
The name of feature / module this view belongs to | String |
filename |
Name of the view | String |
Generate File Structure
login_feature
β views
β β login
β β β£ view_model
β β β β login_viewmodel.dart
β β β login_view.dart
Integration Test Brick
Mason Brick to create a template for integration test
- Activate view bricks
- Using
mason add
command
mason add view
--git-url https://github.com/GameOnAnil/vanilla-stacked-bricks.git
--git-path bricks/integration_test
- Add directly to
mason.yaml
bricks:
view:
git:
url: 'https://github.com/GameOnAnil/vanilla-stacked-bricks.git'
path: 'bricks/integration_test'
Variables for the Command Line β¨
Variable | Description | Type |
---|---|---|
modulename |
The name of feature / module this integration test belongs to | String |
Generate File Structure
integration_test
β sample
β β£ common
β β β sample_common.dart
β β£ finders
β β β sample_finders.dart
β β sample_test.dart
Feature/Module Brick
Mason Brick to create a template for feature/module in our MVVM flutter architecture.
- Activate v_module bricks
- Using
mason add
command from
mason add v_module
- Add directly to
mason.yaml
from git
bricks:
v_module:
git:
url: 'https://github.com/GameOnAnil/vanilla-stacked-bricks.git'
path: 'bricks/v_module'
Variables for the Command Line β¨
Variable | Description | Type |
---|---|---|
module_name |
The name of feature / module this integration test belongs to | String |
Generate File Structure
β πui
β β πlogin
β β β£ πmodels
β β β β πhello.md
β β β£ πrepository
β β β β πlogin_repository.dart
β β β£ πservices
β β β β πlogin_service.dart
β β β πviews
β β β β πhello.md