-
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
albertoodev edited this page Jul 21, 2026
·
5 revisions
- Dart SDK ≥ 3.9 / Flutter ≥ 3.3
Use SPM as a Git dependency from a Flutter project:
dev_dependencies:
spm:
git:
url: https://github.com/albertoodev/spm.gitThen fetch dependencies:
flutter pub getTo work on SPM itself, from the repo root:
dart pub getThe three core commands form a pipeline. A typical session:
# 1. Static analysis: one JSONL record per State subclass
dart run bin/spm.dart analyze --output results.jsonl /path/to/flutter/project
# 2a. Inject instrumentation and run in one step (recommended; always --profile)
dart run bin/spm.dart run --jsonl results.jsonl --flutter run
# …or do the two steps separately:
# 2b. Inject the SpmState base class into target State classes
dart run bin/spm.dart inject --jsonl results.jsonl /path/to/flutter/project
# 3. Restore the original source when you're done
dart run bin/spm.dart inject --jsonl results.jsonl --mode remove /path/to/flutter/projectTwo commands stand outside the main pipeline:
# Extract rebuild scopes into standalone, compilable widgets
dart run bin/spm.dart isolate --output-dir ./isolated_widgets /path/to/flutter/project
# Statically check that a mutation is a clean structural variant of a base file
dart run bin/spm.dart validate --base base.dart --mutation mutation.dart- Per-command references: analyze · inject · run · isolate · validate
- Output Formats for what the JSONL actually contains.
- Architecture for how the code is organized.
Commands
Reference
Internals
Contributing