onScanResults property
Stream<List<ScanResult> >
get
onScanResults
This is the same as scanResults, except:
- it does not re-emit previous results after scanning stops.
Implementation
static Stream<List<ScanResult>> get onScanResults {
if (isScanningNow) {
return _scanResults.stream;
} else {
// skip previous results & push empty list
return _scanResults.stream.skip(1).newStreamWithInitialValue([]);
}
}