ConsentForm class

Editable consent form returned by the native runtime.

Mirrors the flat shape the runtime emits from synheart_core_consent_get_editable_form.

The runtime intentionally surfaces consent at the category level (biosignals, phone_context, behavior) rather than exposing per-channel toggles to hosts. Channel-level truth is stored inside the runtime and intersected against the cloud default profile on submit.

Available extensions

Constructors

ConsentForm({required String profileId, required bool biosignals, required bool phoneContext, required bool behavior, required ConsentTier consentTier, required bool allowCloud, required bool allowResearch, required bool allowVendorSync, bool syni = false})
const
ConsentForm.fromChannelMap({required String profileId, required ConsentTier consentTier, required Map<ConsentType, bool> channels})
Build a ConsentForm from a channel map — the symmetric inverse of ConsentForm.toChannelMap() (defined in consent_type_meta.dart).
factory
ConsentForm.fromJson(Map<String, dynamic> json)
factory

Properties

allowCloud → bool
Top-level switch: cloud processing permitted.
final
allowResearch → bool
Top-level switch: research export permitted.
final
allowVendorSync → bool
Top-level switch: vendor sync (Whoop/Garmin/etc.) permitted.
final
behavior → bool
Category-level toggle: at least one behavior channel granted.
final
biosignals → bool
Category-level toggle: at least one biosignals channel granted.
final
consentTier → ConsentTier
Processing tier (local, cloud, research).
final
hashCode → int
The hash code for this object.
no setteroverride
phoneContext → bool
Category-level toggle: at least one phone-context channel granted.
final
profileId → String
Profile id the runtime resolved this form against. "offline-default" when no cloud profile has been cached yet.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
syni → bool
Feature toggle: on-device + cloud Syni (LLM coach) permitted.
final

Methods

copyWith({String? profileId, bool? biosignals, bool? phoneContext, bool? behavior, ConsentTier? consentTier, bool? allowCloud, bool? allowResearch, bool? allowVendorSync, bool? syni}) → ConsentForm
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toChannelMap() → Map<ConsentType, bool>

Available on ConsentForm, provided by the ConsentFormMap extension

toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override