stream method
Implementation
Stream<List<Frame>> stream({int? numFrames}) async* {
final _numFrames = numFrames ?? (_sampleRate ~/ 5);
try {
while (connected && acquiring) {
final frames = await read(_numFrames);
yield frames;
}
} on SenseException catch (e) {
if (e.type == SenseErrorType.CONTACTING_DEVICE_ERROR) {
disconnect();
return;
} else {
rethrow;
}
}
}