sonarfit_flutter 2.6.0
sonarfit_flutter: ^2.6.0 copied to clipboard
Flutter plugin for SonarFit SDK - AI-powered strength training with real-time rep detection
Changelog #
All notable changes to the SonarFit Flutter plugin will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.6.0 - 2026-09-17 #
Added #
- Headless rep detection on Apple Watch. Keep your own watch screen and receive SonarFit as a rep stream: set started, live count, set ended.
- Runs in your workout session or its own. SonarFit can count inside your app's existing
HKWorkoutSession, so heart rate, energy and the Fitness save stay yours, or it can manage the session itself. - Live set events on the phone.
observeHeadlessDetectionon iOS andheadlessEventsin the Flutter plugin mirror the watch's set on the phone. - Rep goals. Start a set with a fixed target, a range, or open-ended counting until the lifter stops.
- On-wrist count. The watch shows and buzzes each rep the moment it completes.
[Unreleased] #
Added #
SonarFit.headlessEvents: a stream ofHeadlessEventfor apps whose native Watch app counts reps with SonarFit inside its own UI (headless watch detection). The phone app only needsinitialize; subscribe to mirror the sets live (set started, running count, set result, workout ended). Requires the native SDK 2.6.0 frameworks.
2.5.2 - 2026-08-03 #
Fixed
- Resolved a rare startup slowdown in apps using the Apple Watch integration.
2.5.1 - 2026-07-28 #
Added
- Offline-first licensing — the SDK initialises and runs fully offline, with no network call at startup. Your API key carries a licence that is verified on-device and renews silently when a connection is available.
- Privacy tier — usage can be metered as an anonymous aggregate count with no device identifier, for privacy-first apps.
Fixed
- Apple Watch: the first workout after a fresh install now detects reps reliably.
2.5.1 aligns the React Native and Flutter wrappers with the 2.5.0 iOS release.
2.4.2 - 2026-07-19 #
Changed #
- Improve shoulder-press rep counting: setup and re-rack movements are no longer miscounted.
- Reduce false reps triggered by stair climbing (AirPods).
- Improve live rep-count responsiveness on Apple Watch.
- Internal diagnostics hardening — no functional change.
Fixed #
- Restore AirPods deadlift detector parity.
2.4.1 - 2026-07-07 #
Fixed #
- Now ships the current SDK binary. Earlier releases vendored stale, pre-rewrite XCFrameworks (old Core ML models + older detectors). This release re-vendors the current SDK build — no bundled ML models, and the current signal-based detectors (including the v53–v56 shoulder-press, stairs, parity and live-stream fixes).
Added #
- Shoulder Press and Bicep Curl (Apple Watch), matching the native SDK.
WorkoutTypenow includesshoulderPressandbicepCurl.
2.4.0 - 2026-06-28 #
Fixed #
- Apple Watch: tapping "Lift" on the iPhone during a rest period now stays in sync with the watch — previously it could drop a set or leave the set-review prompt stuck.
- Apple Watch: starting a new workout right after finishing one now connects reliably every time.
- Apple Watch: the workout-complete screen now shows once and cleanly after the final set.
2.3.0 - 2026-06-26 #
Added #
- Apple Watch rep detection for shoulder press, bicep curl, and deadlift.
WorkoutTypemetadata: muscle groups, supported devices, and exercise-category filtering.- On-watch set-review sheet (confirm, adjust reps, or discard a set) with an auto-skip timer.
- End-set-early during a workout, from the watch or the phone.
- Per-rep verdict callbacks (
onUserVerdictResolved,onAnyVerdictResolved). - Raw-set upload pipeline for feedback and rest analysis.
Changed #
- The watch returns to the clock face after a workout and wakes to the ready screen only on intent (open app, return from background, or edit the workout).
- Workout configuration is now a single versioned source delivered watch↔phone, removing config-sync races.
- The HealthKit session ends on workout completion so the watch app can background; no HealthKit session runs while idle (battery).
Fixed #
- Rep-count accuracy improvements across the watch detectors.
- Back-to-back workouts now start reliably (resolved a mirror-start stall).
- Correct set indexing when a new set or workout begins during the end-of-set window.
Security #
- Production builds strip symbol and reflection-metadata names; detection internals are no longer present as readable text in the shipped binary. No public API change.
2.1.3 - 2026-03-22 #
Changed
- Remove source
.mlmodelfiles from the SDK bundle to prevent unnecessary Xcode recompilation in client projects
2.1.2 - 2026-03-22 #
Breaking Changes
- Rename SDK module from
SonarFittoSonarFitKit— update all import statements - Rename rep and set properties on workout models for clarity — update any references to affected fields
- Update logging API to support granular log levels — replace previous log configuration calls with the new
LogLevelAPI
Added
- Add
WatchStatusManagerto monitor and respond to Apple Watch app state changes - Add
resendWatchConfigmethod to re-push configuration to the Watch when connectivity is lost - Add communicating-state UI indicator when the SDK is syncing with the Watch
- Add Watch handshake to verify connection before workout operations
- Add device availability checks when starting or resuming a workout
- Add headphone status delegate to receive AirPods connectivity updates
- Add
skipRestWithCountdownmethod as a timed variant ofskipRest
Changed
- Update AirPods rep detector to v2 model with improved motion filtering for more accurate rep counts
- Replace AirPods workout detection with a new processing pipeline for lower latency and higher reliability
- Improve Watch connectivity handling and workout device session management
2.1.1 - 2026-03-22 #
Breaking Changes
- Rename SDK module from
SonarFittoSonarFitKit— update all import statements - Rename rep and set properties on workout models for clarity — update any property references at call sites
- Replace logging API with new granular log level system — update any custom logging configuration
Added
- New AirPods workout detection pipeline for rep counting via headphone motion sensors
WatchStatusManagerfor observing Apple Watch app status- Headphone status delegate for monitoring AirPods availability during workouts
- Device availability checks before workout start and resume
skipRestWithCountdownmethod to skip rest periods with a countdownresendWatchConfigmethod to re-sync configuration with the paired Watch- Watch handshake flow to confirm communication before workout begins
- Communicating state UI to surface Watch connectivity status to users
- New color theme options for SDK UI components
Changed
- Improve AirPods rep detector with updated v2 ML model and enhanced signal filtering
- Improve Apple Watch connectivity reliability and workout device handling
2.1.0 - 2026-03-22 #
Breaking Changes
- Rename SDK module from
SonarFittoSonarFitKit— update all imports and references - Rename rep and set properties on workout models for clarity — update any code accessing these fields directly
Added
- Add
WatchStatusManagerto expose Apple Watch connection and app status - Add device availability checks before starting or resuming a workout
- Add
skipRestWithCountdownAPI for skipping rest periods with a countdown - Add headphone status delegate for monitoring AirPods connectivity state
- Add
resendWatchConfigmethod to re-sync configuration with the paired Watch - Add granular log level system with updated logging API for filtering SDK output
- Add communicating state indicator in UI during Watch data sync
Changed
- Upgrade AirPods rep detector to v2 model with improved signal filtering for more accurate rep counts
- Introduce new AirPods workout detection pipeline for improved reliability
- Improve Watch connectivity handling and workout device session management
- Update theme manager with new color options and remove unused color definitions
2.0.0 - 2025-01-27 #
Added #
WorkoutStatusenum for tracking completion status (.completedor.stoppedEarly)- Error code
E_CANCELLEDthrown when user dismisses workout before starting - Error code
E_NO_RESULTfor unexpected nil results from SDK
Changed #
deviceTypeparameter inWorkoutConfigis now required (must specify.watchor.airpods)WorkoutResultnow usesstatus: WorkoutStatusinstead of boolean flags- All
WorkoutResultfields are now required (non-nullable) - User cancellations now throw
SonarFitExceptioninstead of returning partial results
Platform Support #
- iOS 17.0+
- Flutter 3.3.0+
- Dart 3.0.0+
- SonarFitKit iOS SDK 2.0.1
1.0.0 - 2025-01-25 #
Added #
- Initial release of SonarFit Flutter plugin
- Built-in workout UI with
SonarFit.presentWorkout() - Support for 3 workout types: Squat, Deadlift, Bench Press
- Automatic rep detection using Apple Watch or AirPods Pro
- Real-time progress tracking with set/rep counters
- Rest timer management with customizable durations
- Permission handling for motion sensors
- Complete Dart models:
WorkoutConfig,WorkoutResult,WorkoutSet - Comprehensive error handling with
SonarFitException - Example app demonstrating basic usage
- Full API documentation in README
Platform Support #
- iOS 17.0+
Dependencies #
- Flutter SDK: 3.3.0+
- Dart SDK: 3.0.0+
- SonarFitKit iOS SDK: 2.0.1