I'm facing a serious problem to print receipt using Bluetooth for sending to thermal printer Zebra. I successfully connected to printer's Bluetooth, but nothing happen when I want to print. I used an Ipad to test.
Future<void> printWithDevice(BluetoothDevice device) async {
const PaperSize paper = PaperSize.mm80;
final profile = await CapabilityProfile.load();
print(device.state.length);
final gen = Generator(PaperSize.mm58, await CapabilityProfile.load());
final printer = BluePrint(chunkLen: 512);
printer.add(gen.qrcode('https://altospos.com'));
printer.add(gen.text('Hello'));
printer.add(gen.text('World', styles: const PosStyles(bold: true)));
printer.add(gen.feed(1));
await printer.printData(device);
//device.disconnect();
}
Please I need help, I spent 5 days to find a solution. Excuse me for my english!