Skip to content

flutterflytech/mason_templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mason templates

Logo

A template generator which helps teams generate files quickly and consistently. It can be helpful for developers who find themselves writing the same code over and over again.

In simple term, You can create your own folder structure and files for your project and use it globally in all your projects.

This project contains cubit template which write your boilerplate code for cubit.

Installation

Run this command

1.Global Installation

 dart pub global activate mason_cli

2.Local Installation (With dart)

 dart pub add mason_cli

(With flutter)

 flutter pub add mason_cli

Get Started with mason

Run this command in your project terminal

$ mason init

This command will initialize mason in your current directory. It will generate a mason.yaml along with a .mason directory.

App Screenshot

Prequisties

Add these packages in pubspec.yaml before you use this template.

flutter_bloc: ^8.1.2
equatable: ^2.0.5

Template Structure

The folder structure are as follows

feature
|- cubit
|   |- feature_cubit.dart
|   |- feature_state.dart
|- screen
|   |- feature_screen.dart
|- widgets
|   |- feature_widget.dart

The real structure will look like this…

Screenshot 2023-03-01 at 12 51 39 PM

Usage/Examples

Run this command to add cubit template

$ mason add cubit_brick --git-url https://github.com/flutterflytech/mason_templates --git-path bricks/cubit_brick

this will add cubit_brick in project & you can see in mason.yaml

Screenshot 2023-03-01 at 12 54 28 PM

Run this command to make a new template

$ mason make cubit_brick

Screenshot 2023-03-01 at 12 56 20 PM

Screenshot 2023-03-01 at 2 08 51 PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages