Package selection guidance compiled from public package information, community data, and project usage.
BluetoothPrint is a Flutter plugin enabling developers to create applications that communicate with Bluetooth thermal printers on both Android and iOS platforms. It simplifies the process of sending print commands, such as text and images, to compatible devices. The plugin handles low-level Bluetooth interactions, allowing for seamless integration into receipt printing, ticketing, and point-of-sale systems. With support for both major mobile operating systems, it provides a cross-platform solution for businesses needing reliable, on-the-go printing capabilities.
Use cases
Receipt printing
Ticket generation
Point-of-sale systems
Inventory labeling
Mobile order processing
Key features
Cross-platform support (iOS & Android)
Simple API for sending print data
Supports text and image printing
Built-in Bluetooth device discovery
Reliable connection management
Suitable for
Retail apps
Restaurant POS systems
Event ticketing apps
Field service tools
Mobile inventory management
Considerations
Requires compatible Bluetooth thermal printer
Limited to specific printer models
May need additional configuration for certain devices
Platform-specific permissions required
Depends on hardware reliability
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Introduction
BluetoothPrint is a bluetooth plugin for Flutter, a new mobile SDK to help developers build bluetooth thermal printer apps for both iOS and Android.(for example, Gprinter pt-280、pt-380、gp-1324、gp-2120 eg.)
Underway(please suggest)
[ ] print x,y positions
[ ] set paper size
[ ] more print examples
Map<String, dynamic> config = Map();
List<LineText> list = List();
list.add(LineText(type: LineText.TYPE_TEXT, content: 'A Title', weight: 1, align: LineText.ALIGN_CENTER,linefeed: 1));
list.add(LineText(type: LineText.TYPE_TEXT, content: 'this is conent left', weight: 0, align: LineText.ALIGN_LEFT,linefeed: 1));
list.add(LineText(type: LineText.TYPE_TEXT, content: 'this is conent right', align: LineText.ALIGN_RIGHT,linefeed: 1));
list.add(LineText(linefeed: 1));
list.add(LineText(type: LineText.TYPE_BARCODE, content: 'A12312112', size:10, align: LineText.ALIGN_CENTER, linefeed: 1));
list.add(LineText(linefeed: 1));
list.add(LineText(type: LineText.TYPE_QRCODE, content: 'qrcode i', size:10, align: LineText.ALIGN_CENTER, linefeed: 1));
list.add(LineText(linefeed: 1));
## GettingStartedByteData data = await rootBundle.load("assets/images/guide3.png");
List<int> imageBytes = data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);
String base64Image = base64Encode(imageBytes);
list.add(LineText(type: LineText.TYPE_IMAGE, content: base64Image, align: LineText.ALIGN_CENTER, linefeed: 1));
This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code forAndroid and/or iOS.
await bluetoothPrint.printReceipt(config, list);
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.
# .a filename must begin with lib, eg. 'libXXX.a'
s.vendored_libraries = '**/*.a'
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>