stacked_cli 1.0.2 stacked_cli: ^1.0.2 copied to clipboard
A command line tool to specially use with Flutter stacked architecture or MVVM architecture as suggested by FilledStack.
Stacked CLI #
Note: This tool is only applicable to stacked / MVVM architecture project by FilledStack Stacked Architecture
Get Started #
-
Make sure you have dart sdk installed in your pc.
and add environment variable your path
PATH_TO_FLUTTER_SDK/bin/cache/dart-sdk/bin
-
Clone this repo.
git clone https://github.com/Huzaifaahmed20/stacked_cli.git
-
Install dependencies:
cd stacked_cli && pub get
-
Add alias for quick access.
alias generate_stacked_view='dart PATH-TO-CLONED_DIR/bin/main.dart $1 $2'
Usage #
How to add view: #
use this alias in your stacked architecture project.
$ generate_stacked_view view name-in-small-words
For example:
$ generate_stacked_view view login
It will generate some files and folders (if not exist) in your lib folder with some starting code.
How to add service: #
$ generate_stacked_view service firestore
it will generate services folder and service file in it and it also injects that service in your app