read method

Future<ReadReply?> read(
  1. ReadOptions readOptions
)

Reads user data.

You can read data by time, device, data collector, and more by specifying the related parameters in ReadOptions.

Implementation

Future<ReadReply?> read(
  ReadOptions readOptions,
) async {
  final Map<dynamic, dynamic>? result =
      await _channel.invokeMethod<Map<dynamic, dynamic>?>(
    'read',
    readOptions.toMap(),
  );
  if (result == null) {
    return null;
  }
  return ReadReply.fromMap(result);
}