Integrate Bluetooth Thermal Printer
Last updated
Last updated
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Portable Bluetooth thermal printers are used to generate the mini receipts.
Dependencies
bluetooth_thermal_printer
js
Enable Bluetooth in the respective mobile device.
Switch the thermal printer.
Tap on the Print button from the respective screen if the printer device is connected already it will print the receipt directly or else it will show a dialogue with a list of Bluetooth devices, from their user need to a selected respective thermal printer, once the device is paired successfully it will generate a receipt in the printer.
printTicket
โ Used to write the bytes to the thermal printer if the device is connected otherwise it will show paired Bluetooth devices in a dialogue.
Required Arguments โ bytes, context
getTicket
โ Used to generate the bytes from the Image and also set the paper size. Required Arguments โ Image
showMyDialog
โ Used to show the Paired Bluetooth devices Required Arguments โ bytes, context
setConnect
โ If the device is already connected it will generate the receipt or else it will show the paired devices to connect.