scan static method
Scans for nearby BLE devices until the listener cancels the stream.
When timeout elapses, the stream closes and scanning stops if it has no
remaining listeners. On Android, the plugin requests runtime permissions
before scanning when they have not yet been granted.
Implementation
static Stream<BleScanResult> scan({Duration? timeout}) =>
_platform.scan(timeout: timeout);