fetchDeviceList method

Future<List<String>> fetchDeviceList()

Waits for the device list completer result

Implementation

Future<List<String>> fetchDeviceList() async {
  final _channel = await _channelCompleter.future;
  final devices =
      await _channel.invokeMethod<List<dynamic>?>('fetchDeviceList');
  return devices?.map((e) => e.toString()).toList() ?? [];
}