Best practices
Config
Section titled “Config”- Prefer a preset, then override only what you must.
- Keep feature names snake_case (
auth,user_profile). - Commit
stackchain.yamland.stackchain/lock.yaml.
Day to day
Section titled “Day to day”- Add features with
feature— don’t hand-wire routes/DI. - Put custom methods in
// <stackchain:custom>— not insidegenerated/routesmarkers. - Put custom assertions in
test/features/<feature>_custom_test.dart. - Use
test <feature>for the full suite; refresh with--overwritewhen needed. - Preview big changes:
--dry-runbeforemigrateor--overwrite.
Evolving
Section titled “Evolving”| Need | Command |
|---|---|
| Re-wire routes/DI | sync |
| Refresh packages | upgrade |
| Switch Bloc → Cubit, etc. | migrate --state cubit |
| Full test suite | test auth or test --all |
Security
Section titled “Security”Keep secure_storage for tokens. Turn on strict_quality: true for production apps.