v0.0.5barcode_finder
Barcode Finder 是一個用於從 PDF 檔案和影像中讀取條碼和 QR 碼的外掛程式,Android 使用 Zxing,iOS 使用 Zxing 和 Zbar。
PopcodeMobile/barcode-finder open-source repository details.
以下為英文專案原文快照,最新內容請造訪 GitHub。
A flutter plugin for barcode scanner that works on both iOS and Android. Provides functionality for scanning several formats of 1D and 2D barcodes.
It uses ML-kit on Android and iOS to detect codes from PDF and Image files.
Add this to your package's pubspec.yaml file:
dependencies:
barcode_finder: latest version
API 21 is the minimum supported for Android.
Lets take a look at how to use BarcodeFinder to scan any PDF or image File using File Picker as a auxiliar plugin.
Future<String?> scanFile() async {
// Used to pick a file from device storage
final pickedFile = await FilePicker.platform.pickFiles();
if (pickedFile != null) {
final filePath = pickedFile.files.single.path;
if (filePath != null) {
return await BarcodeFinder.scanFile(path: path);
}
}
}
Make sure you are passing a valid and permissioned path to BarcodeFinder.scanFile, in the exemple above, the package FilePicker provides it for us.
依賴清單 2 項
{"sdk":"flutter"}{"sdk":"flutter"}先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗