HealthDataPoint constructor
HealthDataPoint(
- HealthValue _value,
- HealthDataType _type,
- HealthDataUnit _unit,
- DateTime _dateFrom,
- DateTime _dateTo,
- PlatformType _platform,
- String _deviceId,
- String _sourceId,
- String _sourceName,
Implementation
HealthDataPoint(
this._value,
this._type,
this._unit,
this._dateFrom,
this._dateTo,
this._platform,
this._deviceId,
this._sourceId,
this._sourceName) {
// set the value to minutes rather than the category
// returned by the native API
if (type == HealthDataType.MINDFULNESS ||
type == HealthDataType.HEADACHE_UNSPECIFIED ||
type == HealthDataType.HEADACHE_NOT_PRESENT ||
type == HealthDataType.HEADACHE_MILD ||
type == HealthDataType.HEADACHE_MODERATE ||
type == HealthDataType.HEADACHE_SEVERE ||
type == HealthDataType.SLEEP_IN_BED ||
type == HealthDataType.SLEEP_ASLEEP ||
type == HealthDataType.SLEEP_AWAKE) {
this._value = _convertMinutes();
}
}