Skip to content

Troubleshooting

Run from the project root (where pubspec.yaml is), or pass --path.

Existing files are skipped by default. Use --overwrite, or sync for router/DI markers.

The quality gate fails when dart analyze exits non-zero. Fix the reported issues, then re-run.

Terminal window
dart run stackchain doctor

strict_quality: true also treats analyzer infos as fatal (--fatal-infos).

Need flutter_localizations (SDK) and generate: true. Run:

Terminal window
dart run stackchain upgrade
flutter pub get
flutter gen-l10n # if needed

Do not pin an old intl (e.g. ^0.19.0) — it conflicts with the Flutter SDK.

Set them explicitly, or omit both while state_management: getx so defaults kick in.

After pub get:

Terminal window
dart run build_runner build --delete-conflicting-outputs

Restore from git and re-run with --keep-old. Look for *.stackchain.bak backups if a legacy unmarked file was replaced.

  • Feature logic → // <stackchain:custom> in presentation/state classes
  • Don’t put irreplaceable code in bootstrap.dart / main*.dart / app.dart (those are rewritten)
  • Router/DI hand-written code outside markers survives state-only migrates

Pages still use old Bloc after migrate to Cubit

Section titled “Pages still use old Bloc after migrate to Cubit”

Upgrade to 1.3.1+. Then:

Terminal window
dart run stackchain migrate --state cubit
# or heal one feature:
dart run stackchain feature auth --overwrite

Add it first: dart run stackchain feature auth, then dart run stackchain test auth.

Use snake_case: user_profile, not UserProfile.

Add another feature first, then remove the one you don’t want.