Skip to main content

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 your pubspec.yaml:
Install dependencies:

Platform Configuration

iOS Configuration

Add to ios/Runner/Info.plist:

Android Configuration

Add to android/app/src/main/AndroidManifest.xml:

Basic Usage

Initialize the SDK

Subscribe to HSI Updates

The HSI (Human State Interface) stream emits raw JSON from the on-device runtime:

Activate optional modules

The SynheartFeature 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).
State signals (focus, emotion, recovery, etc.) are not separate features — they’re axes inside the HSI JSON emitted by 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 granted cloudUpload 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 granted cloudUpload consent.
Authentication is hardware-backed device ECDSA per RFC-AUTH-MOBILE-0001. The runtime owns request signing via the host’s 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

The SDK enforces consent at multiple levels:
For the full consent model (granular channels, tiers, JWT lifecycle), see Consent System.

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: Streams:

Resources