getRaw method
Implementation
@override
Stream<double> getRaw() {
var timestampAtLastCall = DateTime.now().millisecondsSinceEpoch;
return _environmentSensors.humidity.where((event) {
if (DateTime.now().millisecondsSinceEpoch - timestampAtLastCall > inMillis) {
timestampAtLastCall = DateTime.now().millisecondsSinceEpoch;
return true;
}
return false;
});
}