discover static method

discover let you explore all bluetooth printer nearby your device

Implementation

static Future<List<BluetoothPrinter>> discover() async {
  var results = await BluetoothService.findBluetoothDevice();
  return [
    ...results
        .map((e) => BluetoothPrinter(
              id: e.address,
              name: e.name,
              address: e.address,
              type: e.type,
            ))
        .toList()
  ];
}