getListDevices property

Future<List<BluetoothObject>> getListDevices

Implementation

static Future<List<BluetoothObject>> get getListDevices async {
  final String devices = await (_channel.invokeMethod(PrinterMethod.getList)
      as FutureOr<String>);

  final List<dynamic> devicesJson = json.decode(devices);

  print('devicesJson => $devicesJson');
  return devicesJson
      .map<BluetoothObject>(
          (dynamic item) => BluetoothObject.fromJson(json.decode(item)))
      .toList();
}