Search packages, repositories and app categories

Package detailsv0.0.5

pos_printer_manager

flutter package for print or list down both wireless and bluetooth esc printer devices.

30-day downloads
47
Likes
41
Pub points
70

Install package

flutter pub add pos_printer_manager

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package designed to manage both wireless and Bluetooth ESC/POS printers, enabling seamless printing from mobile applications. It simplifies device discovery, connection, and printing operations, making it ideal for retail, hospitality, and point-of-sale systems. The package supports multiple printer types and provides a consistent interface across platforms, though platform-specific configurations may be required. It is built for developers seeking reliable, cross-platform printing capabilities in POS environments.

Use cases

  • Retail POS systems
  • Restaurant order printing
  • Invoice generation
  • Mobile checkout solutions
  • Event ticket printing

Key features

  • Bluetooth and Wi-Fi printer support
  • ESC/POS command compatibility
  • Device discovery and pairing
  • Cross-platform printing
  • Simple API for printing text and receipts

Suitable for

  • Flutter developers building POS apps
  • Businesses needing mobile printing
  • Developers integrating receipt printers
  • Startups with limited hardware expertise
  • Applications requiring lightweight printing

Considerations

  • Requires manual setup for some printer models
  • Limited platform support mentioned
  • May need additional configuration for specific devices
  • Depends on external library for ESC/POS commands
  • No official documentation provided in the package

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

pos_printer_manager

This plugin allow developer to print to esc printer both wireless or bluetooth (currently support only on android). This has method to list down those printers easily.

Example

  • Bluetooth Printer
  _scan() async {
    print("scan");
    setState(() {
      _isLoading = true;
      _printers = [];
    });
    var printers = await BluetoothPrinterManager.discover();
    print(printers);
    setState(() {
      _isLoading = false;
      _printers = printers;
    });
  }

  _connect(BluetoothPrinter printer) async {
    var paperSize = PaperSize.mm80;
    var profile = await CapabilityProfile.load();
    var manager = BluetoothPrinterManager(printer, paperSize, profile);
    await manager.connect();
    print(" -==== connected =====- ");
    setState(() {
      _manager = manager;
      printer.connected = true;
    });
  }

  _startPrinter() async {
    final content = Demo.getShortReceiptContent();
    var bytes = await WebcontentConverter.contentToImage(content: content);
    var service = ESCPrinterService(bytes);
    var data = await service.getBytes(paperSize: PaperSize.mm58);
    if (_manager != null) {
      print("isConnected ${_manager.isConnected}");
      _manager.writeBytes(data, isDisconnect: false);
    }
  }
  • Network Printer
  _scan() async {
    setState(() {
      _isLoading = true;
      _printers = [];
    });
    var printers = await NetworkPrinterManager.discover();
    setState(() {
      _isLoading = false;
      _printers = printers;
    });
  }

  _connect(NetWorkPrinter printer) async {
    var paperSize = PaperSize.mm80;
    var profile = await CapabilityProfile.load();
    var manager = NetworkPrinterManager(printer, paperSize, profile);
    await manager.connect();
    setState(() {
      _manager = manager;
      printer.connected = true;
    });
  }

  _startPrinter() async {
    if (_data.isEmpty) {
      final content = Demo.getShortReceiptContent();
      var bytes = await WebcontentConverter.contentToImage(
        content: content,
        executablePath: WebViewHelper.executablePath(),
      );
      var service = ESCPrinterService(bytes);
      var data = await service.getBytes();
      if (mounted) setState(() => _data = data);
    }

    if (_manager != null) {
      print("isConnected ${_manager.isConnected}");
      _manager.writeBytes(_data, isDisconnect: false);
    }
  }
  • USB Printer
_scan() async {
    setState(() {
      _isLoading = true;
      _printers = [];
    });
    var printers = await USBPrinterManager.discover();
    setState(() {
      _isLoading = false;
      _printers = printers;
    });
  }

  _connect(USBPrinter printer) async {
    var paperSize = PaperSize.mm80;
    var profile = await CapabilityProfile.load();
    var manager = USBPrinterManager(printer, paperSize, profile);
    await manager.connect();
    setState(() {
      _manager = manager;
      printer.connected = true;
    });
  }

  _startPrinter() async {
    if (_data.isEmpty) {
      final content = Demo.getShortReceiptContent();
      var bytes = await WebcontentConverter.contentToImage(
        content: content,
        executablePath: WebViewHelper.executablePath(),
      );
      var service = ESCPrinterService(bytes);
      var data = await service.getBytes();
      if (mounted) setState(() => _data = data);
    }

    if (_manager != null) {
      print("isConnected ${_manager.isConnected}");
      _manager.writeBytes(_data, isDisconnect: false);
    }
  }

Supports

Device Network Bluetooth USB
Android ✓ ✓ ✓
IOS ✓ ✓ ✗
Macos ✓ ✗ ✗
Windows ✓ ✗ ✓
Linux ✓ ✗ ✗

*** USB: will be the set to the next plan of update

Getting Started

  flutter pub add pos_printer_manager

Thank to :

Categories

Dependencies

Dependency list 8 items

Source repository

Projects using this package

No data available yet.