Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 1.5 KB

README.md

File metadata and controls

67 lines (46 loc) · 1.5 KB
BLoC

Generates a new Bloc in Dart. Built for the bloc state management library.

Prerequisite 🛠

Mason setup

To get started, install mason using one of the following methods:

# 🎯 Activate from https://pub.dev
dart pub global activate mason_cli

# 🍺 Or install from https://brew.sh
brew tap felangel/mason
brew install mason

Flutter setup

We recommend using asdf as a version manager. Follow these steps to set up:

  1. Install asdf.
  2. Use the Flutter version specified in .tool-versions by running this command:
asdf install
  1. Ensure sure you have flutter_bloc installed:
flutter pub add flutter_bloc

Usage 🚀

Register the brick with the following command:

mason add bloc --path bricks/bloc

Now you can utilize the brick with:

mason make bloc

Variables ✨

Variable Description Default Type
name The name of the BLoC class Test string

Output 📦

└── test
    ├── bloc.dart
    ├── event.dart
    └── state.dart