๐ฆ BlueThermal Plus --- Flutter Bluetooth Thermal Printer Plugin
A high-performance Flutter plugin for printing to thermal printers over Bluetooth Low Energy (BLE) and Bluetooth Classic (SPP) on Android and iOS.
Built with a clean transport-layer architecture for reliability, scalability, and production-grade stability.
โจ Features
- BLE printing with MTU-aware chunking\
- Bluetooth Classic (SPP) support\
- Automatic MTU negotiation\
- Smart data chunking & retry system\
- Auto-disconnect after print\
- Real-time device discovery events\
- Unified transport interface\
- Epson ePOS SDK transport on iOS (optional SDK install)\
- Production tested
๐ฑ Supported Platforms
Platform BLE Classic Epson ePOS
Android โ โ โ iOS โ โ (MFi) โ
๐ง Architecture
Flutter โ TransportRouter โ PrinterTransportManager โ (BleTransport / ClassicTransport / EpsonEposTransport)
๐ Installation
dependencies:
blue_thermal_plus: ^0.1.0
๐ก Basic Usage
import 'package:blue_thermal_plus/blue_thermal_plus.dart';
final printer = BlueThermalPlus();
await printer.startScan();
await printer.connect(deviceId: deviceId);
await printer.printRawBytes(bytes);
โ๏ธ BLE Config Example
await printer.configure(const PrinterConfig(
ble: BleConfig(
chunkSize: 200,
chunkDelayMs: 10,
autoDisconnectMs: 3000,
),
));
๐งพ Epson TM-P80II on iOS
Epson printers such as TM-P80II_001379 should use the iOS Epson ePOS SDK
transport instead of the Zebra BLE UUID transport:
final printer = BlueThermalPlus();
await printer.configure(PrinterProfiles.epsonTmP80II);
await printer.startScan(transport: PrinterTransport.epson);
await printer.connect(
deviceId: device.id,
transport: PrinterTransport.epson,
);
await printer.printRawBytes(bytes, transport: PrinterTransport.epson);
The Epson SDK binary is not bundled in this package. Download Epson ePOS SDK for
iOS from Epson and copy libepos2.xcframework to:
ios/Frameworks/libepos2.xcframework
Then run pod install in the iOS app. The SDK is intentionally ignored by git
and should be supplied by the consuming app/release environment. If the printer uses Bluetooth Classic
MFi, add Epson's external accessory protocol in the app Info.plist:
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.epson.escpos</string>
</array>
Keep com.zebra.rawport in the same array if your app also supports Zebra.
For BLE Epson discovery, use EpsonPortType.bluetoothLe; for mixed discovery,
the default profile uses EpsonPortType.all.
๐ข Events
scanStarted, deviceFound, connected, ready, status, error, disconnected
๐งช Testing
Flutter contract tests + native core logic + real device integration.
๐จโ๐ป Author
Mateus Polonini Cardoso
๐ License
MIT