readTodaySummationList method

Future<List<SampleSet?>?> readTodaySummationList(
  1. List<DataType> dataTypes
)

Reads the summary data of multiple data types of the current day.

If the related data type does not support aggregation statistics, an exception will be thrown.

Implementation

Future<List<SampleSet?>?> readTodaySummationList(
  List<DataType> dataTypes,
) async {
  final List<dynamic>? result =
      await _channel.invokeMethod<List<dynamic>?>(
    'readTodaySummationList',
    DataType.toMapList(dataTypes),
  );
 List<SampleSet> records = <SampleSet>[];
  if (result != null) {
    for (dynamic e in result) {
      records.add(SampleSet.fromMap(e));
    }
  }
  return records;
}