getDiscoveredDevices method

  1. @override
Future<List<BluetoothDevice>> getDiscoveredDevices()
override

Get list of discovered devices

Implementation

@override
Future<List<BluetoothDevice>> getDiscoveredDevices() async {
  final List<dynamic> result = await methodChannel.invokeMethod('getDiscoveredDevices') ?? [];
  return result.map((device) => BluetoothDevice.fromMap(Map<String, dynamic>.from(device))).toList();
}