readDailySummation method
Reads the daily statistics of a specified data type.
You can set the data type, start time, and end time to read the daily statistics in the specified period. If the related data type does not support aggregation statistics, an exception will be thrown.
Implementation
Future<SampleSet?> readDailySummation(
DataType dataType,
int startTime,
int endTime,
) async {
final Map<dynamic, dynamic>? result =
await _channel.invokeMethod<Map<dynamic, dynamic>?>(
'readDailySummation',
<String, dynamic>{
'dataType': dataType.toMap(),
'startTime': startTime,
'endTime': endTime,
},
);
if (result == null) {
return null;
}
return SampleSet.fromMap(result);
}