blue_print_pos

Creator: coderz1093

Last updated:

Add to Cart

Description:

blue print pos

Introduction #
This plugin to help use bluetooth printer in Android/iOS. Support for text, image, add new line or
line dashed and QR.
Usage #
Initialize #
BluePrintPos bluePrintPos = BluePrintPos.instance;
copied to clipboard
Scan bluetooth printer #
bluePrintPos.scan();
copied to clipboard
Connect bluetooth printer #
bluePrintPos.connect(device);
copied to clipboard
Print Text #
In method .addText(text, {size, style, alignment}) you can modify size, style and alignment
ReceiptSectionText receiptText = ReceiptSectionText();
receiptText.addText('MY STORE', size: ReceiptTextSizeType.medium, style: ReceiptTextStyleType.bold);
copied to clipboard
Print text left right #
receiptText.addLeftRightText('Time', '04/06/21, 10:00');
copied to clipboard
Print image #
final ByteData logoBytes = await rootBundle.load('assets/logo.jpg');
receiptText.addImage(
base64.encode(Uint8List.view(logoBytes.buffer)),
width: 150,
);
copied to clipboard
Add new line #
receiptText.addSpacer();
copied to clipboard
Add new line with dash #
receiptText.addSpacer(useDashed: true);
copied to clipboard
Getting Started #
Android #
Change the minSdkVersion in android/app/build.gradle in 19
android {
defaultConfig {
minSdkVersion 19
}
}
copied to clipboard
Add permission for Bluetooth and access location in android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
copied to clipboard
iOS #
Add info key in ios/Runner/Info.plist
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Need BLE permission</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Need BLE permission</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Need Location permission</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Need Location permission</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Need Location permission</string>
copied to clipboard
Thanks to #
Reference and dependencies create this plugin

blue_thermal_printer
esc_pos_utils
esc_pos_utils_plus
flutter_blue
image
qr_flutter
webcontent_converter

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.