getDevices method
实现 FlutterBluetoothPluginPlatform.getDevices。
Web 只能按 ID 返回当前站点已授权或本次页面已选择过的设备。
Implementation
@override
Future<List<BluetoothDevice>> getDevices(List<String> deviceIds) async {
await _authorizedDevices();
return deviceIds
.map((deviceId) => _knownDevices[deviceId])
.whereType<_WebBluetoothDevice>()
.map(_deviceFromWeb)
.toList(growable: false);
}