getConnectedDevices method

  1. @override
Future<List<BluetoothDevice>> getConnectedDevices({
  1. List<String> serviceUuids = const <String>[],
})
override

实现 FlutterBluetoothPluginPlatform.getConnectedDevices

参数、默认值、平台差异和推荐值见平台接口文档。

Implementation

@override
Future<List<BluetoothDevice>> getConnectedDevices({
  List<String> serviceUuids = const <String>[],
}) async {
  final response = await methodChannel.invokeListMethod<dynamic>(
    'getConnectedDevices',
    <String, dynamic>{'serviceUuids': serviceUuids},
  );
  return _deviceListFromPlatform(response);
}