deviceList method

Future<List> deviceList()

获得设备列表

Implementation

Future<List> deviceList() async {
  try {
    String? json = await methodChannel.invokeMethod("deviceList");
    if (json == null || json.isEmpty) {
      return Future.value([]);
    }
    return Future.value(convert.json.decode(json));
  } catch (e) {
    rethrow;
  }
}