readLast method

Future<HealthData> readLast (DataType type)

Implementation

static Future<HealthData> readLast(DataType type) async {
  return await read(type, limit: 1)
      .then((results) => results.isEmpty ? null : results[0]);
}