PulseWorkoutReading constructor

PulseWorkoutReading(
  1. PulseWorkoutType feature,
  2. double value, {
  3. int? timestamp,
})

Constructs a PulseWorkoutReading with the given feature, value, and optional timestamp. If timestamp is not provided, the current time is used.

Implementation

PulseWorkoutReading(this.feature, this.value, {int? timestamp})
    : timestamp = timestamp != null
          ? DateTime.fromMillisecondsSinceEpoch(timestamp)
          : DateTime.now();