-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Utpal Barman edited this page Jan 8, 2024
·
2 revisions
A collection of useful bricks by Monstarlab.
Ensure you have the mason_cli installed.
# 🎯 Activate from https://pub.dev
dart pub global activate mason_cli# 🍺 Or install from https://brew.sh
brew tap felangel/mason
brew install masonTo ensure that you have mason installed in your system, run mason on your terminal.
masonYou should see something similar.
🧱 mason • lay the foundation!
...Initiate the mason by running the following command:
# Initiate the mason
mason initThis command should create a file named mason.yaml.
In your project include these in mason.yaml.
bricks:
widget:
service:
url: https://github.com/monstar-lab-oss/flutter-bricks.git
path: bricks/service
usecase:
url: https://github.com/monstar-lab-oss/flutter-bricks.git
path: bricks/usecase
feature:
url: https://github.com/monstar-lab-oss/flutter-bricks.git
path: bricks/feature| Brick | Description |
|---|---|
service |
Generate a new service (data and domain) |
usecase |
Generate a new usecase (domain) |
feature |
Generate a new feature (ui, cubits, etc.) |
If you have mason.yaml in place just run the following commands to start using:
# 🎯 To get all mason bricks from mason.yaml
mason get
...Now you are ready to go! Each time you modify this brick.yaml, we need to run this mason get command.
For example, if you want to make service classed in your project —
# 🚀 To make service from mason brick template
mason make service
...Also, make sure you add these lines to your .gitignore file if you are using git in your project.
# Local Mason Files
.mason/
# Locaked Mason files
mason-lock.json