Health sync configuration
Generated reference for ovok_flutter: health sync configuration.
- Stable unknown
- Release candidate since 0.1.0-rc.6
- Development since 0.1.0-dev.32+1028d01
HealthSyncConfiguration
class HealthSyncConfiguration<TType>Immutable configuration shared by Apple Health and Health Connect sync.
Constructors
HealthSyncConfiguration.new
HealthSyncConfiguration<TType>({
required Map<HealthSyncKey, HealthSyncTypeConfiguration<TType>> dataToSync,
int chunkSize = defaultHealthSyncChunkSize,
bool wifiOnly = false,
void Function(Object?)? onError,
void Function(Map<HealthSyncKey, SyncProgress>)? onProgress,
})Creates a health sync configuration.
| Parameter | Type | Kind | Default |
|---|---|---|---|
dataToSync | Map<String, HealthSyncTypeConfiguration<TType>> | required named | |
chunkSize | int | named | defaultHealthSyncChunkSize |
wifiOnly | bool | named | false |
onError | void Function(Object?)? | named | |
onProgress | void Function(Map<String, SyncProgress>)? | named |
Properties
HealthSyncConfiguration.dataToSync
final Map<String, HealthSyncTypeConfiguration<TType>> dataToSyncData types and source identifiers to import.
HealthSyncConfiguration.chunkSize
final int chunkSizeMaximum number of records in one provider read.
HealthSyncConfiguration.wifiOnly
final bool wifiOnlyWhether reads wait for Wi-Fi instead of using cellular data.
HealthSyncConfiguration.onError
final void Function(Object?)? onErrorReceives a provider or save failure.
HealthSyncConfiguration.onProgress
final void Function(Map<String, SyncProgress>)? onProgressReceives progress snapshots keyed by health sync key.
HealthSyncTypeConfiguration
class HealthSyncTypeConfiguration<TType>Sync settings for one health key.
Constructors
HealthSyncTypeConfiguration.new
HealthSyncTypeConfiguration<TType>({
required Iterable<HealthSyncTypeIdentifier<TType>> typeIdentifiers,
DateTime? minDate,
HealthDataMode? mode,
})Creates an immutable mapping for one health key.
| Parameter | Type | Kind | Default |
|---|---|---|---|
typeIdentifiers | Iterable<HealthSyncTypeIdentifier<TType>> | required named | |
minDate | DateTime? | named | |
mode | HealthDataMode? | named |
Properties
HealthSyncTypeConfiguration.typeIdentifiers
final List<HealthSyncTypeIdentifier<TType>> typeIdentifiersHealth-source identifiers included for this key.
HealthSyncTypeConfiguration.minDate
final DateTime? minDateEarliest record date to read.
HealthSyncTypeConfiguration.mode
final HealthDataMode? modeOverrides the default aggregation mode for this key.
HealthSyncTypeIdentifier
class HealthSyncTypeIdentifier<TType>A platform type identifier and its optional Ovok observation coding.
Constructors
HealthSyncTypeIdentifier.new
HealthSyncTypeIdentifier<TType>({
required TType typeIdentifier,
String? code,
String? system,
String? display,
})Creates a health-source identifier with optional observation coding.
| Parameter | Type | Kind | Default |
|---|---|---|---|
typeIdentifier | TType | required named | |
code | String? | named | |
system | String? | named | |
display | String? | named |
Properties
HealthSyncTypeIdentifier.typeIdentifier
final TType typeIdentifierIdentifier understood by the configured health source.
HealthSyncTypeIdentifier.code
final String? codeObservation code; defaults to the SDK's reviewed mapping.
HealthSyncTypeIdentifier.system
final String? systemCoding system for code.
HealthSyncTypeIdentifier.display
final String? displayHuman-readable display for code.
defaultHealthSyncChunkSize
int get defaultHealthSyncChunkSizeLast updated on