readDailySummationList method
Reads the daily statistics of multiple data types.
You can set the data types, start time, and end time to read the daily statistics in the specified period. If the related data types does not support aggregation statistics, an exception will be thrown.
Implementation
Future<List<SampleSet?>?> readDailySummationList(
List<DataType> dataTypes,
int startTime,
int endTime,
) async {
final List<dynamic>? result =
await _channel.invokeMethod<List<dynamic>?>(
'readDailySummationList',
<String, dynamic>{
'dataType': DataType.toMapList(dataTypes),
'startTime': startTime,
'endTime': endTime,
},
);
List<SampleSet> records = <SampleSet>[];
if (result != null) {
for (dynamic e in result) {
records.add(SampleSet.fromMap(e));
}
}
return records;
}