Overview
The Synheart Core Flutter SDK provides a unified API for collecting HSI-compatible data, processing human state on-device, and generating focus/emotion signals in Flutter applications. Key Features:- Cross-platform support (iOS + Android)
- On-device HSI Runtime
- Real-time state updates
- Modular design (enable only what you need)
- Privacy-first architecture
Installation
Add to yourpubspec.yaml:
Platform Configuration
iOS Configuration
Add toios/Runner/Info.plist:
Android Configuration
Add toandroid/app/src/main/AndroidManifest.xml:
Basic Usage
Initialize the SDK
Subscribe to HSI Updates
The HSI (Human State Intelligence) stream emits raw JSON from the on-device runtime:Activate optional modules
TheSynheartFeature enum gates collection by feature. Activation is one
of four conditions a feature needs (the others are consent, capability
tier, and an active session — see Capability System).
Synheart.onHSIUpdate.
Parse the JSON or use the typed Synheart.onStateUpdate stream to read
them.
Enable the cloud connector
Upload HSI 1.3 snapshots when the host has been grantedcloudUpload
consent:
Complete example
HSI state reference
Synheart.onHSIUpdate emits raw HSI 1.3 JSON strings. The typed
projection of that JSON is HSIState, surfaced via
Synheart.onStateUpdate. Most apps use the typed stream; reach for the
raw JSON only when you need fields the typed projection doesn’t expose
(for example, the 64D embedding vector).
modalities and tiers carry per-axis source attribution and capability gating. The exact shape can drift between HSI versions; treat the typed fields as best-effort and the rawJson as authoritative. See the HSI specification and Synheart Core HSI mapping.
Cloud connector
The cloud connector uploads HSI 1.3 snapshots to the Synheart Platform when the host has been grantedcloudUpload consent.
synheart-auth
integration — CloudConfig does not carry shared secrets or
HMAC keys. See Synheart Auth overview for
the device-identity flow.
Upload Payload (HSI 1.3 format):
Configuration Options
Error Handling
Privacy & Consent
The SDK enforces consent at multiple levels:Performance Considerations
These are design targets, not measured runtime numbers — profile your own app for ground truth on the current build. Use the diagnostic getters to inspect what the SDK is actually doing.Diagnostics & upload inspection
API reference
Synheart
Main SDK class.
Static methods:
| Method | Description | Returns |
|---|---|---|
initialize(...) | Initialize the SDK | Future<void> |
activate(feature) | Activate a feature | void |
deactivate(feature) | Deactivate a feature | void |
dispose() | Tear down the SDK and release resources | Future<void> |
runtimeDiagnostics() | Live counters / last-error strings | Map<String, dynamic> |
| Stream | Type | Description |
|---|---|---|
onHSIUpdate | Stream<String> | Raw HSI 1.3 JSON, emitted per window close |
onStateUpdate | Stream<HSIState> | Typed projection of onHSIUpdate |
Resources
- Repository: synheart-core-flutter
- pub.dev: synheart_core
- API Docs: API Reference
- Issues: GitHub Issues
Related Documentation
- HSV Specification - Understand Synheart Core’s internal state model
- Architecture - Deep dive into the system
- Capability System - Access levels and permissions