systemDevices property
Future<List<BluetoothDevice> >
get
systemDevices
Retrieve a list of devices currently connected to the system
- The list includes devices connected to by any app
- You must still call device.connect() to connect them to your app
Implementation
static Future<List<BluetoothDevice>> get systemDevices async {
var result = await _invokeMethod('getSystemDevices');
var r = BmDevicesList.fromMap(result);
for (BmBluetoothDevice device in r.devices) {
if (device.platformName != null) {
_platformNames[device.remoteId] = device.platformName!;
}
}
return r.devices.map((d) => BluetoothDevice.fromProto(d)).toList();
}