SDK overview
package:pose_flow is the runtime SDK, pose detection, movement
tracking, rep counting, form analysis. It’s a Flutter plugin
(Android + iOS native; web via WASM Web Worker; macOS via
package:camera on Apple Silicon).
The authoring side (PoseFlow Studio) ships as a separate package
(package:pose_flow_studio) that depends on this one. Consumer apps
that only count reps depend on the runtime package alone; hosts that
embed the authoring UI (a CMS, a trainer dashboard) depend on both.
Two barrel files
import 'package:pose_flow/pose_flow.dart';The full SDK, includes the native Flutter widgets
(TrackedMovementView,
PoseCameraView, etc.). Use this on
mobile / desktop targets.
import 'package:pose_flow/pose_flow_core.dart';The web-safe subset, everything except the camera widgets and the native plugin surface. Use this in web-only consumers OR in shared code paths where the camera comes from another source.
The mental model
┌────────────────────────────────┐ │ Movement │ ← .pose file in memory │ (model) │ └──────────────┬─────────────────┘ │ tracker.load(movement) v┌─────────────────┐ ┌────────────────────────────────┐│ Pose │ -> │ MovementTracker │ -> TrackingResult / frame│ (per frame, │ │ - PhaseStateMachine │ -> RepCompletedEvent stream│ display- │ │ - rep counter + scoring gate│ -> FormFeedbackEvent stream│ space) │ │ - FormServiceV2 │└─────────────────┘ │ - CameraAngleDetector │ ▲ │ - FrameValidator │ │ └────────────────────────────────┘┌─────────────────┐│ PoseSource │ (NativePoseSource by default ,│ (camera / │ the FFI bridge to the pure-C│ replay / etc) │ pose engine in package:blaze_flow)└─────────────────┘What you’ll use most
The 80/20 surface, almost every consumer reaches for these:
| Type | Role |
|---|---|
Movement | The in-memory .pose model. Always start by loading one. |
TrackedMovementView | The drop-in widget that does camera + pose + tracking. |
MovementTracker | The orchestrator. Mount it directly when you need fine-grained control. |
LoadMovementArgs | The canonical builder for tracker init args. Always use this rather than calling load by hand. |
TrackingResult | The per-frame result from processFrame. |
RepCompletedEvent | Streamed on every completed rep. |
FormFeedbackEvent | Streamed on every triggered form rule. |
What’s underneath
The parts you DON’T need to touch unless you’re customising:
| Type | Role |
|---|---|
PoseSource | Abstraction for “where do poses come from”. Default: NativePoseSource. |
NativePoseSource | The FFI bridge to the pure-C pose engine in package:blaze_flow. |
PhaseStateMachine | Phase transition machine. Picks rule-based OR vector-matching mode based on the loaded Movement, see Rep counting. |
FormServiceV2 | Per-frame form-rule evaluator. Consumed inside MovementTracker; see FormRule for the inputs. |
CameraAngleDetector / StableCameraAngleDetector | 16-bucket camera-angle classification, see CameraAngleDetector. |
FrameValidator | Visibility + distance gates. |
AngleExtractor | Joint angle computation from landmarks. |
PipelineTimingReport | Per-frame perf breakdown surfaced by PoseCameraView.onPipelineTiming. |
Models
The pure-data types you’ll serialise / round-trip:
| Type | Notes |
|---|---|
Movement | Top-level movement document. |
Pose | One detected pose: 33 landmarks + visibility + optional world coords. |
Landmark | 2D point with visibility. |
PoseFrame | A pose with a name (used in recorded reference frames). |
PhaseConfig | One phase + its transitions. |
TrackingPoint | One measurement channel. |
FormRule | One form rule. |
FormFeedback | Cue payload: text + optional audio / haptic. |
RepDetectionConfig | How a rep is counted. |
RepScoringConfig | Optional rep-quality gate. |
TrackingResult | Per-frame tracker output. |
MovementConfig | Runtime config-overlay, swap tracking points / phases / form rules at load time. |
CameraBucket | One of 16 canonical buckets. |
CameraAngle | High-level enum: front / side / any. |
Authoring helpers (for tools, not the runtime)
package:pose_flow/pose_flow.dart exports the authoring catalogue
used by PoseFlow Studio:
| Type | Role |
|---|---|
MovementIntents | Curated preset list, “knees deep”, “stance wide”, etc. |
MovementValidator | Lints a Movement for common authoring mistakes. |
AngleDefinitions, DistanceDefinitions, RatioDefinitions, PositionDefinitions, VelocityDefinitions, StabilityDefinitions | Per-kind channel catalogues that drive the Studio’s measurement picker. |
CameraBuckets | The canonical 16-bucket ring. |
ScoringProfileInferrer | Derives default scoring bands from sample reps. |
These are NOT needed for runtime tracking; they’re for tools that need to know “what channels can I author against?”.
The Studio wrapper
package:pose_flow_studio adds one runtime piece on top of this SDK:
| Type | Role |
|---|---|
ShowcaseTracker | Thin facade over MovementTracker with a ValueNotifier<TrackingFrame> for ergonomic per-frame UI subscription. Used by every Studio + showcase + CMS surface. |
Consumer apps that only play back authored movements don’t need the
Studio package, they use MovementTracker directly via
TrackedMovementView.
Read next
MovementTracker, the central runtime class.TrackedMovementView, the drop-in widget.Movement, the model.- Tracking pipeline, how it all fits together per frame.