搜尋套件、儲存庫與 APP 分類

套件詳情v0.0.14

blue_print_pos

用於連接藍牙打印機裝置的外掛程式,支援 Android 與 iOS

近 30 天下載
100
喜歡數
56
Pub 分數
70

安裝套件

flutter pub add blue_print_pos

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

BluePrintPOS 是一個 Flutter 外掛程式,可在 Android 與 iOS 平台上實現與藍牙印表機設備的無縫連接。它提供簡單的 API 來發送列印命令,非常適合零售、銷售點(POS)及收據列印應用。此外掛程式有效處理裝置搜尋、配對與資料傳輸,確保與相容印表機的可靠通訊。透過最少設定,開發者可將即時列印功能整合至其應用程式中。支援常見的列印作業,例如文字、條碼與影像輸出。

適用情境

  • 零售POS系統
  • 收據列印
  • 庫存管理
  • 事件票務列印
  • 移動訂單處理

主要特色

  • 藍牙打印機連接
  • 跨平台支援(Android 與 iOS)
  • 文字和條碼列印
  • 簡單 API 結合
  • 即時列印命令執行

適合對象

  • 開發POS應用的開發者
  • 移動零售解決方案
  • 現場服務應用程式
  • 隨身列印需求
  • 需要便攜式收據列印的企業

使用建議

  • 需要相容的藍牙列印機
  • 僅限 Android 和 iOS 平台
  • 印表機特定的格式可能會有所不同
  • 需要適當的藍牙存取權限
  • 可能需要針對特定硬體型號進行測試

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

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; 
Scan bluetooth printer
bluePrintPos.scan();
Connect bluetooth printer
bluePrintPos.connect(device);
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);
Print text left right
receiptText.addLeftRightText('Time', '04/06/21, 10:00');
Print image
final ByteData logoBytes = await rootBundle.load('assets/logo.jpg');
receiptText.addImage(
  base64.encode(Uint8List.view(logoBytes.buffer)),
  width: 150,
);
Add new line
receiptText.addSpacer();
Add new line with dash
receiptText.addSpacer(useDashed: true);

Getting Started

Android

Change the minSdkVersion in android/app/build.gradle in 19

android {
  defaultConfig {
     minSdkVersion 19
  }
}

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"/>
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>

Thanks to

Reference and dependencies create this plugin

所屬分類

依賴

依賴清單 5 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。