v1.6.0
scan
사용자 지정 옵션을 사용하여 위젯 트리에서 QR 코드 및 바코드를 스캔합니다. 경로에서 QR 코드 및 바코드 이미지를 정확하게 디코딩합니다.
178좋아요 1.6천30일 다운로드130Pub 점수
AndroidiOS
위젯 트리에서 QR 코드 스캔 및 이미지에서 QR 코드 디코딩
{"sdk":"flutter"}{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
scan qrcode & barcode in widget tree.
decode qrcode & barcode image from path.
if you want to generate qrcode image, you should use qr_flutter
ScanView in widget tree to show scan view.Scan.parse.info.list
<key>NSCameraUsageDescription</key>
<string>Your Description</string>
<key>io.flutter.embedded_views_preview</key>
<string>YES</string>
<uses-permission android:name="android.permission.CAMERA" />
<application>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
scan: ^newest
import 'package:scan/scan.dart';
ScanController controller = ScanController();
String qrcode = 'Unknown';
Container(
width: 250, // custom wrap size
height: 250,
child: ScanView(
controller: controller,
// custom scan area, if set to 1.0, will scan full area
scanAreaScale: .7,
scanLineColor: Colors.green.shade400,
onCapture: (data) {
// do something
},
),
),
controller.resume() and controller.pause() resume/pause cameracontroller.resume();
controller.pause();
String result = await Scan.parse(imagePath);
controller.toggleTorchMode();
-ignorewarnings
-keepattributes *Annotation*
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable
-keep class com.huawei.hianalytics.**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class com.huawei.hms.**{*;}
MIT License