Skip to content

HealthSamplingConfiguration

The sampling configuration of the HealthSamplingPackage.HEALTH measure.

Sets which healthDataTypes to collect. As a HistoricSamplingConfiguration, each collection fetches data back to the last time data was collected, or past back in time on the first collection.

Inheritance
Annotations

Constructors

HealthSamplingConfiguration.fromJson

HealthSamplingConfiguration.fromJson(
  1. Map<String, dynamic> json
)

HealthSamplingConfiguration

HealthSamplingConfiguration({
  1. Duration? past,
  2. required List<HealthDataType> healthDataTypes,
})

Properties

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

healthDataTypes

List<HealthDataType> healthDataTypes
getter/setter pair

The list of HealthDataType to collect.

Types not supported on the current platform are removed by the HealthProbe when it is initialized.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.