flutter_thermal_printer 3.0.0
flutter_thermal_printer: ^3.0.0 copied to clipboard
Plugin for Flutter to print on thermal printers via ESC/POS commands.
3.0.0 #
Breaking changes
printDataandprintWidgetnow return whether printing succeeded.chunkSizenow means bytes per Bluetooth write, not MTU.- Renamed
connectionStabilizationDelaytoconnectionTimeout; old name still works. - Removed the unused
printOnBleparameter fromprintWidget. - Requires
universal_ble3.4.2; Bluetooth device IDs are now lower-case. getPrinters()throws when Bluetooth permission is denied or unsupported.- Android: a USB printer's
addressis now its device path. - Windows: printers report their real type; PDF and fax aren't USB.
- Removed unused
PrinterManager.initialize()and dead platform-interface methods.
Fixes
- Prints sent at the same time no longer mix together.
- Android: large USB prints no longer get cut off.
- Android: USB printing no longer freezes the app.
- Android: USB printers with several interfaces can now print.
- Android: fixed crash on second USB connect after
stopScan(). - Android: USB
connect()returnsfalseuntil permission is granted. - macOS: fixed "/usr/bin/lp: No such file or directory" print error.
- macOS: builds with the macOS 27 SDK. Thanks
@yahya-sh! - macOS: printing no longer blocks the UI.
- macOS:
connect()no longer crashes on printers missingproductId. - macOS: paused print queues now report as not connected.
- Web: apps using this package now build with
--wasm. - USB and network printers now report the correct
connectionState. - Bluetooth printers that go out of range leave the list.
- Bluetooth
connect()no longer reports connected printers as failed. - Bluetooth printing works on printers that reject MTU requests.
- Bluetooth scanning no longer re-sends the list on every advertisement.
isBleTurnedOnStreamemits the current state immediately, then each change.- Network: refused or unknown hosts report
printerConnected, nottimeout. - Network: a failed print no longer breaks the following prints.
- Network: prints to a stalled printer fail after
writeTimeout(30 s). - Android: USB printers appear and disappear as you plug them.
- Android: two USB printers of the same model both work.
- Android: denying USB permission no longer shows the dialog twice.
- Windows: removed printers leave the list.
- Windows: printing no longer blocks the UI.
- Windows: paused or offline printers report as not connected.
- Windows: scanning no longer fails when no printer is installed.
PrinterManager.dispose()no longer breaks the manager for later use.- macOS: printing no longer logs every job to the console.
Improvements
Printeris now exported from the main package import.- Bluetooth prints start faster after the first one.
- Windows: installed network printers appear in NETWORK scans.
- Network printers now work through
connect(),printData()andprintWidget(). - Works with Flutter 3.38 and later, down from 3.41.
- README: platform setup, quick start and 3.0.0 migration guide.
2.3.0 #
- Classify installed macOS printers from their native device URI as USB, NETWORK, or unknown, instead of labeling every print queue as USB.
- Add
Printer.deviceUri,queueName,isSystemPrinter, andconnectionTypeFromDeviceUri, preserving queue metadata through serialization and connection-state updates. - Include installed macOS network queues in the default scan. Explicit USB-only scans now exclude network queues; NETWORK-only scans return installed macOS network queues. Unknown queues appear when both USB and NETWORK are requested.
- Keep macOS system queues on the native printing backend for connection checks,
printData, andprintWidget, regardless of connection type. Network classification does not imply ESC/POS compatibility or discover uninstalled LAN printers. - Refresh macOS queue snapshots to remove deleted printers and reflect changed connection types, and return filtered device-list snapshots to stream listeners.
- Update the example to include network queues and display each printer's connection type, with regression tests for classification, filtering, metadata preservation, and native print routing.
2.2.2 #
- Preserved BLE advertisement data (
services,serviceData, andmanufacturerDataList) when scan results are converted toPrinterobjects and during connection-state synchronization. Thanks to@Erengunfor the changes in PR #50.
2.2.1 #
- Added Swift Package Manager support for iOS and macOS, so Flutter apps can use the plugin through the newer Apple package flow.
- Kept CocoaPods support in place for projects that have not moved fully to Swift Package Manager yet.
- Moved the iOS and macOS Swift sources into the package layout expected by Swift Package Manager.
- Updated the iOS minimum version to 13.1 to match the current
universal_blerequirement. - Updated dependency versions, including
universal_ble,image, andwin32. - Fixed the Windows raw-printing helpers so they compile cleanly with the latest
win32API.
2.0.1 #
- Fixed BLE discovery to also include system-connected devices using
getSystemDevices(). - Fixed BLE reconnect behavior so connection state updates correctly when reconnecting from system Bluetooth settings.
- Added BLE connection-state synchronization and listener management to keep
devicesStreamin sync after disconnect/reconnect cycles. - Updated BLE scan initialization to honor Android fine-location permission settings through platform scan config.
2.0.0 #
-
Major Refactoring & Code Quality Improvements
- Fixed all linting and static analysis issues across the project.
- Improved null safety and type safety in
PrinterandPrinterManager. - Refactored
Printerclass to correctly handle name overrides and data sanitization. - Fixed Windows stub implementation for better cross-platform compatibility.
-
Documentation
- Added comprehensive DartDoc comments for all public methods in
FlutterThermalPrinterandPrinterManager. - Documented all parameters including
chunkSize,connectionStabilizationDelay, and others.
- Added comprehensive DartDoc comments for all public methods in
-
Testing
- Fixed and updated unit tests to ensure reliability Thanks to
@LosDanieloss. - Verified behavior of
Printerclass serialization and initialization.
- Fixed and updated unit tests to ensure reliability Thanks to
1.2.4 #
- For windows and macos no chunking is required
1.2.3+1 #
- Updated BLE MTU query or pass custom chunksize
1.2.3 #
- Added Full Support for USB on Macos
- Changed Flutter_blue_plus to universal_ble for better support of BLE and Classic Devices
1.2.2 Optimized Version #
-
Enhanced Memory Management
- Proper stream lifecycle management with automatic cleanup
- Improved resource disposal in disconnect operations
- Optimized singleton pattern for thread safety
- Better garbage collection patterns
-
Image Processing Improvements
- Dynamic chunked image processing for better memory efficiency
- Improved image validation with comprehensive error handling
- Optimized image resizing algorithms
- Better support for varying image dimensions
-
Network Printer Enhancements
- Automatic connection validation and reconnection
- Improved socket error handling with specific exception types
- Better connection state management
- Enhanced timeout handling
-
Code Architecture Improvements
- Immutable Printer model with validation methods
- Separated concerns into focused, testable methods
- Enhanced error handling with meaningful messages
- Comprehensive documentation and type safety
-
Platform-Specific Optimizations
- Windows: Enhanced BLE initialization with proper error handling
- Android/iOS: Optimized BLE scanning with better subscription management
- All Platforms: Improved USB printer detection and management
-
New Features
copyWith()method for immutable Printer updatesuniqueIdproperty for better printer identificationhasValidConnectionDatavalidation method- Enhanced connection type validation
- Comprehensive toString() and equality implementations
-
Breaking Changes
- Printer class fields are now final (immutable)
- Use
copyWith()for printer updates instead of direct field assignment - Some internal method signatures have changed for better error handling
-
Developer Experience
- Added OPTIMIZATION_GUIDE.md with detailed optimization explanations
- Enhanced analysis_options.yaml with strict linting rules
- Improved error messages for better debugging
- Better type safety throughout the codebase
1.2.1 #
- Fixed the issue of Flutter Blue plus for windows as it not supported for windows
- Github repo for issues is now changed
1.2.0 #
- Fixed BLE turn on exception for ios and macos by
@eduardohr-muniz - Reduced time to print image on ble devices by
@eduardohr-muniz
1.1.0 #
- Added Improvments for windows Printing Thanks to
@eduardohr-muniz - Updated Dependents Packages
1.0.1 #
- Updated ReadMe
1.0.0 #
- New Feature Network Printers added
- Thanks to
@eduardohr-muniz
0.0.20 #
- Bugs fixed for usb printers
0.0.19+2 #
- Bugs fixed for usb printers
0.0.19+1 #
- Bugs Fixes
0.0.19 #
- Refracted code and fixed bugs
0.0.18+1 #
- Update some bugs
0.0.18 #
- Added
turnOnBluetoothfunction - Added
isBleTurnedOnStreamStream of bluetooth is turned on or off - Added
isBleTurnedOnfunction - Added
printWidgetfunction for printing any flutter widget - Updated USB Connection for Android
- Updated BLE for All Platforms
0.0.17 #
- Fixed get system devices in ble
0.0.16 #
- Bumped packages dependent on like flutter_blue_plus,win32,flutter_utils_plus
0.0.15 #
- Added new extension for Printer of connectionsState
- Now you can get system connected devices on macos
0.0.14 #
- Fixed flickering of bt devices
- Added some improvements
0.0.13 #
- Removed unused library flutterlib_serialport
- Updated some dependencies
0.0.12 #
- Some Bugs Fixed in MacOs
0.0.11 #
- Some Bugs Fixed in MacOs
0.0.10 #
- Some Bugs Fixed in MacOs
0.0.9 #
- Added Getting USB Devices for MacOs
0.0.8 #
- Updated Bluetooth Services Package
0.0.7 #
- Removed test printing from the example
0.0.6 #
- Added USB Printing for Windows Devices
- Read Take Care Of part at below in Readme for More.
0.0.5 #
- Added esc_pos_utils_plus for printing
0.0.4 #
- Added getPrinter() to get the printers from both USB and Bluetooth
0.0.3 #
- Added USB Printer Support for Android
0.0.2 #
- Added Support for Windows Bluetooth
- Added Start and Stop Scanning for BLE devices
- Added Connect and Disconnect Printer
- Added Printer Model Class
- Added
longdatato print data for long text
0.0.1 #
- Initial release