Measurement.fromData constructor

Measurement.fromData(
  1. Data data, [
  2. int? sensorStartTime
])

Create a measurement from data based on the sensorStartTime provided by the sensor. If sensorStartTime is not specified, the phones current time stamp as microseconds since epoch is used.

Implementation

factory Measurement.fromData(Data data, [int? sensorStartTime]) =>
    Measurement(
        sensorStartTime:
            sensorStartTime ?? DateTime.now().microsecondsSinceEpoch,
        data: data);