一個 Flutter 插件,透過藍牙、BLE、TCP 和 USB 接口在 Android、iOS 和 Windows 上實現跨平台列印,支援各種印表機的 ESC/POS 命令。它提供統一的 API 來傳送原始印表機命令,非常適合零售、餐飲和銷售點系統中的收據印表機。該插件抽象了平台特定的實作,簡化了在不同裝置和作業系統之間的整合。
適用情境
POS系統中的收據列印
透過藍牙或USB進行移動列印
跨平台列印應用程式
零售和餐廳訂單處理
透過TCP/IP進行遠端列印
主要特色
支援多個平台(Android、iOS、Windows)
處理 ESC/POS 命令傳輸
支援藍牙、BLE、TCP 和 USB
跨平台統一 API
輕便高效
適合對象
開發POS應用的開發者
需要多設備打印的企業
需要可靠收據列印的應用程式
跨平台移動解決方案
與 ESC/POS 印表機配合使用的硬體整合工程師
使用建議
需要相容的ESC/POS印表機
可能需要特定於平台的設定
僅限 ESC/POS 指令集
必須手動處理藍牙配對
沒有內建的列印預覽或格式化工具
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
flutter_pos_printer_platform
Notice: This library was initially forked from arthas1888 in order to use it in a flutter project that use both image v4 and image v3 dart libraries. And since then, the library received many bug fixes after the original library was discontinued.
A library to discover printers, and send printer commands.
This library allows to print esc commands to printers in different platforms such as android, ios, windows and different interfaces as Bluetooth and BLE, USB and Wifi/Ethernet
error:'State restoration of CBCentralManager is only allowed for applications that have specified the "bluetooth-central" background mode'
info.plist add:
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Allow App use bluetooth?</string><key>NSBluetoothPeripheralUsageDescription</key><string>Allow App use bluetooth?</string><key>UIBackgroundModes</key><array><string>bluetooth-central</string><string>bluetooth-peripheral</string></array>