unified_esc_pos_printer 3.3.3
unified_esc_pos_printer: ^3.3.3 copied to clipboard
Unified ESC/POS thermal printer package for Flutter. Supports USB, Bluetooth Classic, BLE, and Network connections with a single PrinterManager API
3.3.3 #
- Fix iOS (and other platforms without USB support) throwing
PrinterConnectionException: USB printing is not supported on this platformduring a combined printer scan (#14). The stub USB connector threw synchronously fromscan(), so anyscanPrinters()/scanAll()that included USB (which the default set does) failed on iOS even when the caller only wanted network, BLE, or Bluetooth printers. USBscan()on unsupported platforms now yields no devices instead of throwing.connect()andwriteBytes()still throw there, since explicitly using a USB printer on such a platform is a genuine error.
3.3.2 #
- Allow Bluetooth scan/connect from a background isolate (e.g. a Firebase Messaging background handler or WorkManager) when the required permissions were already granted in a prior foreground session (#12). The native permission handler previously returned
falsewhenever noActivitywas attached, which is always the case in a background isolate, so everyscan()/connect()threw a permission error even though the OS permissions were granted. It now checks already-granted permissions against the application context (which needs noActivity) and only requires anActivityto prompt for missing ones. Background isolates still cannot show a permission prompt, and Bluetooth discovery remains unreliable there, so connect to a known device by address rather than scanning.
3.3.1 #
- Fix
Ticket.row()/Generator.row()printing each column on its own line on many generic ESC/POS printers (#10). Each column was preceded by its ownESC a(select justification) command. Per the ESC/POS specificationESC ais only honoured at the beginning of a line, and many clone printers respond to a mid-lineESC aby flushing the buffered line and feeding — pushing every column onto a separate line. Column alignment is already achieved by the absolute print position (ESC $), soESC ais now emitted only once per row (left justification, at the start of the line) and never per column. Output is unchanged on printers that previously rendered rows correctly.
3.3.0 #
- Add native Android support for USB Printer Class (interface class
0x07) devices (#5, #8). Most generic ESC/POS thermal printers expose this class instead of a CDC / serial chip and previously failed withNot an Serial devicefrom theusb_serialpackage. The connector now probes each device's USB interface classes and routes Printer Class devices through a new nativeUsbManager+bulkTransferpath while keeping the existingusb_serialpath for CDC / Virtual COM devices (FTDI, CP210x, PL2303, CH34x, USB CDC ACM). The user sees a one-time Android USB permission dialog on first connect to a Printer Class device.
3.2.1 #
- Remove hardcoded permissions from the package's Android manifest. The library no longer declares
BLUETOOTH,BLUETOOTH_ADMIN,BLUETOOTH_SCAN,BLUETOOTH_CONNECT,ACCESS_FINE_LOCATION, orACCESS_COARSE_LOCATION— these previously includedmaxSdkVersion="30"on the location entries, which the Android manifest merger propagated into consuming apps and broke apps that need location permissions on API 31+ for other features (maps, geolocation, etc.). Consumers must now declare the permissions they need in their ownAndroidManifest.xml; see the updated "Android Setup" section in the README for the recommended permission set.
3.2.0 #
- Migrate USB serial dependency from
flutter_libserialporttolibserialport_plusto fix Android 16KB page size compatibility (#3)
3.1.0 #
- Add
PrintRasterColumnclass for FlutterTextStyle-based column definitions - Add
Ticket.rowRaster()method for raster-rendered table rows with full Flutter text styling, multilingual support, and RTL text direction - Update example app with Raster Row & Columns demo
3.0.1 #
- Fix iOS BLE scan stream handler by using explicit
BleScanStreamHandlerwhen setting the stream handler for the BLE scan event channel (#1)
3.0.0 #
- BREAKING: Rename
TextStylestoPrintTextStyle - BREAKING: Rename
stylesparameter tostylein ticket/generator APIs andPrintColumn - BREAKING: Rename
textStyletostyleinTicket.textRaster(...)andrenderTextLinesAsImages(...) - Update README and example app to use the new names
2.0.0 #
- BREAKING: Remove
alignfromTextStyles - Add explicit
alignparameter toTicket.text(...)andTicket.textEncoded(...) - Add
PrintColumn.alignfor row/column alignment - Update
Generatoralignment flow to use explicit alignment parameters - Update
README.mdand example app usage to the new alignment API
1.0.3 #
- Rename
spaceBetweenRowstocolumnGapfor clarity - Only apply
columnGapbetween columns, not after the last column - Change default
columnGapfrom 5 to 1
1.0.2 #
- Improved Pub Score
1.0.1 #
- Update README.md.
1.0.0 #
- Initial release.