Skip to content

Latest commit

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Monstarlab Flutter Bricks 🧱

A collection of useful bricks by Monstarlab.

Installation

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 mason

To ensure that you have mason installed in your system, run mason on your terminal.

mason

You should see something similar.

🧱 mason • lay the foundation!
...

Initiate the mason by running the following command:

# Initiate the mason
mason init

This command should create a file named mason.yaml.

In your project include these in mason.yaml.

bricks:
# service brick
service:
git:
url: "https://github.com/monstar-lab-oss/flutter-bricks.git"
path: bricks/service
# usecase brick
usecase:
git:
url: "https://github.com/monstar-lab-oss/flutter-bricks.git"
path: bricks/usecase
# feature brick
feature:
git:
url: "https://github.com/monstar-lab-oss/flutter-bricks.git"
path: bricks/feature

Bricks

BrickDescription
serviceGenerate a new service (data and domain)
usecaseGenerate a new usecase (domain)
featureGenerate a new feature (ui, cubits, etc.)

⚠️ You must have Dart 3.0 or up to use new language features.

Usage

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 a feature in your project —

# 🚀 To make a feature from mason brick template
mason make feature

Making a feature GIF


Also, make sure you add these lines to your .gitignore file if you are using git in your project.

# Local Mason Files
.mason/
mason-lock.json

About

Flutter project scaffold with Mason CLI for efficient feature creation from bricks. 🧱

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages