Package selection guidance compiled from public package information, community data, and project usage.
A Flutter/Dart package providing essential classes for ESC/POS thermal printing. It includes a Ticket class that generates ESC/POS commands for printing receipts, labels, and tickets. Designed for compatibility across multiple platforms, it enables developers to send formatted print jobs to thermal printers via Bluetooth, Wi-Fi, or USB. The package simplifies command creation with built-in methods for text alignment, font styles, barcodes, and images. Ideal for point-of-sale systems, kiosks, and receipt generation apps.
Use cases
Receipt printing in POS systems
Label generation for retail
Event ticket printing
Order confirmation output
Mobile printer integration
Key features
ESC/POS command generation
Cross-platform support
Text formatting options
Barcode and image embedding
Simple API for ticket creation
Suitable for
Retail applications
Point-of-sale software
Kiosk systems
Mobile printing solutions
IoT device integrations
Considerations
Requires compatible thermal printer
Bluetooth/Wi-Fi connection setup needed
Limited to ESC/POS protocol
No built-in printer discovery
Platform-specific permissions may apply
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
esc_pos_utils
Base Flutter/Dart classes for ESC/POS printing. Generator class generates ESC/POS commands that can be sent to a thermal printer.
To print a QR Code as an image (if your printer doesn't support native commands), add qr_flutter and path_provider as a dependency in your pubspec.yaml file.
String qrData = "google.com";
constdouble qrSize = 200;
try {
final uiImg = awaitQrPainter(
data: qrData,
version: QrVersions.auto,
gapless: false,
).toImageData(qrSize);
final dir = awaitgetTemporaryDirectory();
final pathName = '${dir.path}/qr_tmp.png';
final qrFile = File(pathName);
final imgFile = await qrFile.writeAsBytes(uiImg.buffer.asUint8List());
final img = decodeImage(imgFile.readAsBytesSync());
generator.image(img);
} catch (e) {
print(e);
}
Using Code Tables
Different printers support different sets of code tables. Some printer models are defined in CapabilityProfile class. So, if you want to change the default code table, it's important to choose the right profile: