scan

Last updated:

0 purchases

scan Image
scan Images
Add to Cart

Description:

scan

scan #

scan qrcode & barcode in widget tree.
decode qrcode & barcode image from path.

if you want to generate qrcode image, you should use qr_flutter

Features #

use ScanView in widget tree to show scan view.
custom identifiable area.
decode qrcode from image path by Scan.parse.

prepare #
ios
info.list
<key>NSCameraUsageDescription</key>
<string>Your Description</string>

<key>io.flutter.embedded_views_preview</key>
<string>YES</string>
copied to clipboard
android
<uses-permission android:name="android.permission.CAMERA" />

<application>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
copied to clipboard
scan: ^newest
copied to clipboard
import 'package:scan/scan.dart';
copied to clipboard
Usage #

show scan view in widget tree

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
},
),
),
copied to clipboard

you can use controller.resume() and controller.pause() resume/pause camera

controller.resume();
controller.pause();
copied to clipboard

get qrcode string from image path

String result = await Scan.parse(imagePath);
copied to clipboard

toggle flash light

controller.toggleTorchMode();
copied to clipboard
proguard-rules #
-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.**{*;}
copied to clipboard
License #
MIT License

License:

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

Customer Reviews

There are no reviews.