Bluetooth Thermal Printer Integration
Portable Bluetooth thermal printers are used to generate the mini receipts.
Dependencies
bluetooth_thermal_printer
js

Printing Receipts via Bluetooth Thermal Printer
Enable the 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.
Helper Methods
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 Image and also sets the paper size. Required Arguments → ImageshowMyDialog
→ Used to show the Paired Bluetooth devices Required Arguments → bytes, contextsetConnect
→ If the device is already connected it will generate the receipt or else it will show the paired devices to connect.
Files Path
punjab-mgramseva/common_printer.dart at master · misdwss/punjab-mgramseva
punjab-mgramseva/index.html at master · misdwss/punjab-mgramseva
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Last updated
Was this helpful?