Skip to content
pubscout

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.

Quiet but busy
$ flutter pub add esc_pos_printer
Source repository

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.

Works with

Packages commonly used together with esc_pos_printer: ones it builds on, ones built on it, and its own family.