readings method
Get the measurements or readings from this Sensor.
var readings = await mySensor.readings();
For more information, see Sensor component.
Implementation
@override
Future<Map<String, dynamic>> readings({Map<String, dynamic>? extra}) async {
final request = GetReadingsRequest()
..name = name
..extra = extra?.toStruct() ?? Struct();
final response = await client.getReadings(request);
return response.toPrimitive();
}