Overview
The Synheart Behavior Flutter SDK provides real-time behavioral signal inference from digital interactions for cross-platform mobile applications.Installation
Add topubspec.yaml:
Requirements
- Flutter >= 3.10.0
- Dart >= 3.0.0
Quick Start
Basic Usage
Real-Time Event Tracking
Session Management
On-Demand Metrics Calculation
Calculate behavioral metrics for a custom time range within a session:API Reference
SynheartBehavior
Main Methods:
calculateMetricsForTimeRange()
Calculate behavioral metrics for a custom time range within a session.
Parameters:
Returns:
Future<Map<String, dynamic>> - Map containing all behavioral metrics for the specified time range
Throws: Exception if time range is out of session bounds or session not found
Example:
BehaviorConfig
Parameters:
BehaviorEvent
Properties:
Event Types:
BehaviorEventType.scroll- Scroll interactionsBehaviorEventType.tap- Tap interactionsBehaviorEventType.swipe- Swipe interactionsBehaviorEventType.appSwitch- Foreground / background app-switch events (app_switch)BehaviorEventType.notification- Notification eventsBehaviorEventType.call- Call eventsBehaviorEventType.typing- Typing session events (timing only — never characters)BehaviorEventType.clipboard- Clipboard activity (copy / paste / cut counts only — never content)
BehaviorSession
Methods:
Properties:
BehaviorSessionSummary
Properties:
Motion classification runs in the Synheart Runtime —
consumers subscribe to onMotionSample and forward raw 50 Hz
accelerometer batches to the Synheart Runtime’s motion classifier.
BehavioralMetrics
Properties (12 total):
TypingSessionSummary
The aggregated typing fields live on TypingSessionSummary, accessed
via BehaviorSessionSummary.typingSessionSummary (null when typing
was not active during the session).
Permissions
Notification Permission
Call Permission
Configuration
Update Configuration at Runtime
Resources
- pub.dev: synheart_behavior
- Repository: synheart-behavior-flutter
- Full README: View on GitHub