Introduction
stackchain scaffolds a Flutter app from a simple YAML config — and keeps helping as the project grows.
Version 1.4.0 · MIT · pub.dev
In one sentence
Section titled “In one sentence”Write your preferred stack in stackchain.yaml → run init → get a real app structure → add features and tests with one command.
Why bother?
Section titled “Why bother?”Most generators dump folders once, then disappear. stackchain stays as a dev dependency so you can:
- Add a feature — files, routes, DI, and tests in one command (
crudfor list/form slices) - Generate from OpenAPI —
api openapi.yamlfor models + API repos (re-run safe) - Generate tests — unit, widget, integration (
test auth); stub custom methods withstub - Rename or remove — without leftover routes or DI registrations
- Change stack later — e.g. Riverpod → Bloc with
migrate(custom regions ported) - Keep custom code —
// <stackchain:custom>and*_custom_test.dart - Heal drift —
doctor --fixsyncs markers and refreshes the lockfile
Mental model
Section titled “Mental model”stackchain.yaml → init / feature / sync → your Flutter appYou edit YAML (or pick a preset). The CLI generates and wires the project. You write business logic outside the markers.