v0.6.1simple_barcode_scanner
simple_barcode_scanner 讓您可以在行動裝置、網頁和 Windows 上掃描條碼和 QR 碼。
217喜歡 9260近 30 天下載150Pub 分數
AndroidiOSWebWindows
簡單條碼掃描器
以下為英文專案原文快照,最新內容請造訪 GitHub。
simple_barcode_scanner that let you scan barcode and qr code in mobile,web and windows.
| Android | IOS |
|---|---|
![]() |
![]() |
| Window | Web |
|---|---|
![]() |
![]() |
simple_barcode_scanner: ^0.3.1
Import the library:
import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
ElevatedButton(
onPressed: () async {
String? res = await SimpleBarcodeScanner.scanBarcode(
context,
barcodeAppBar: const BarcodeAppBar(
appBarTitle: 'Test',
centerTitle: false,
enableBackButton: true,
backButtonIcon: Icon(Icons.arrow_back_ios),
),
isShowFlashIcon: true,
delayMillis: 2000,
cameraFace: CameraFace.front,
);
setState(() {
result = res as String;
});
},
child: const Text('Open Scanner'),
)
ElevatedButton(
onPressed: () async {
SimpleBarcodeScanner.streamBarcode(
context,
barcodeAppBar: const BarcodeAppBar(
appBarTitle: 'Test',
centerTitle: false,
enableBackButton: true,
backButtonIcon: Icon(Icons.arrow_back_ios),
),
isShowFlashIcon: true,
delayMillis: 2000,
).listen((event) {
print("Stream Barcode Result: $event");
});
},
child: const Text('Open Scanner'),
)
SizedBox(
width: 200,
height: 200,
child: SimpleBarcodeScanner(
scaleHeight: 200,
scaleWidth: 400,
onScanned: (code) {
setState(() {
result = code;
});
},
continuous: true,
onBarcodeViewCreated: (BarcodeViewController controller) {
this.controller = controller;
},
)),
Feel free to fork and send pull request.
dart pub publish --dry-run
dart pub publish
依賴清單 8 項
{"sdk":"flutter"}^0.4.0^1.9.1^12.0.1^1.1.1^2.0.32{"sdk":"flutter"}^6.0.0先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗