onMeasurement method
On each measurement collected, the onMeasurement handler is called.
Implementations of this interface should handle how to save
or upload the measurement
.
Implementation
@override
Future<void> onMeasurement(Measurement measurement) async =>
await write(measurement);