Quick start
-
Create a Flutter app
Terminal window flutter create my_appcd my_app -
Add stackchain
Terminal window dart pub add --dev stackchain -
(Optional) Set your stack
Create
stackchain.yamlat the project root:stackchain:preset: production_blocfeatures:- splash- auth- homeSkip this to use defaults (Bloc + GoRouter + GetIt).
-
Scaffold
Terminal window dart run stackchain init -
Run
Terminal window flutter pub getflutter runWith flavors (default):
Terminal window flutter run -t lib/main_dev.dart --dart-define=FLAVOR=dev
Add a feature
Section titled “Add a feature”dart run stackchain feature authCreates the feature folder, wires routes + DI, adds a default unit test.
Full test suite
Section titled “Full test suite”dart run stackchain test auth# or every feature:dart run stackchain test --allCustom assertions go in test/features/auth_custom_test.dart (never overwritten).
What you get
Section titled “What you get”lib/├── app/ # App, theme, router├── core/ # network, storage, DI, session├── features/ # one folder per feature└── main.dart- Configuration — YAML fields
- Commands — everyday CLI usage
- test — unit / widget / integration tests
- Examples — copy-paste stacks