Skip to main content

Overview

The Synheart Behavior Flutter SDK provides real-time behavioral signal inference from digital interactions for cross-platform mobile applications.

Installation

Add to pubspec.yaml:
Install:

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:
Note: The time range must be within the session’s start and end times. The SDK automatically validates this and will throw an error if the range is out of bounds.

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

BehaviorConfig

Parameters:

BehaviorEvent

Properties: Event Types:
  • BehaviorEventType.scroll - Scroll interactions
  • BehaviorEventType.tap - Tap interactions
  • BehaviorEventType.swipe - Swipe interactions
  • BehaviorEventType.appSwitch - Foreground / background app-switch events (app_switch)
  • BehaviorEventType.notification - Notification events
  • BehaviorEventType.call - Call events
  • BehaviorEventType.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

For comprehensive documentation, see the full README on GitHub.