ScanSession class abstract

A controllable BLE scan.

Returned by Bluetooth.startScan / BluetoothBackend.startScan. The devices stream emits a BleDevice each time a peripheral is discovered or its advertisement updates (so the same id may appear repeatedly with fresher RSSI/name). Call stop to end the scan and close the stream.

Constructors

ScanSession()

Properties

devices Stream<BleDevice>
A broadcast stream of discovered/updated devices. Listening late is allowed but misses earlier events.
no setter
hashCode int
The hash code for this object.
no setterinherited
isScanning bool
Whether the scan is still running.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stop() Future<void>
Stops the scan and closes devices. Safe to call more than once.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited