esc_pos_printer
4.1.0, released 5 years ago by tablemi.com
Print receipts using an ESC/POS thermal WiFi or Ethernet printer in Flutter and Dart projects.
What it does
Allows connecting to thermal printers via IP addresses and ports to print styled text, images, barcodes, and manage printer cutting and cash drawers.
AI-written summary of version 4.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to print receipts or tickets to a network-connected ESC/POS thermal printer.
- You are working on a Flutter or pure Dart project requiring local receipt printing over WiFi/Ethernet.
Skip it when
- You are trying to print using Bluetooth printers (use esc_pos_bluetooth instead).
- You need complex document layout generation like multi-page PDF generation.
Strengths
- Simple API to connect via host and port to thermal printers.
- Supports text styling, code tables, images, and receipt cutting out of the box.
Weaknesses
- Bluetooth support was moved to a separate library.
- Does not include built-in network scanning (requires external packages like ping_discover_network).
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
not documented
import 'package:esc_pos_printer/esc_pos_printer.dart';
const PaperSize paper = PaperSize.mm80;
final profile = await CapabilityProfile.load();
final printer = NetworkPrinter(paper, profile);
final PosPrintResult res = await printer.connect('192.168.0.123', port: 9100);
if (res == PosPrintResult.success) {
printer.text('Hello World');
printer.cut();
printer.disconnect();
}Alternatives
Packages that do the same job and could replace esc_pos_printer.
- printing
Plugin to generate and print PDFs on Android, iOS, macOS, Windows, Linux and web
88Compare - flutter_esc_pos_utils
Generate ESC/POS commands to print via Bluetooth, Network, or USB thermal printers.
50Compare - esc_pos_utils_plus
Generate ESC/POS commands for thermal receipt printers.
50Compare
Works with
Packages commonly used together with esc_pos_printer: ones it builds on, ones built on it, and its own family.
- imageesc_pos_printer depends on itPure Dart library to load, manipulate, encode, and decode various image formats.
- charset_converteresc_pos_printer depends on itPlatform‑native charset encoder/decoder with no Dart dependencies
- esc_pos_utilsesc_pos_printer depends on itGenerate ESC/POS commands to send to thermal printers.