scan 0.0.7 copy "scan: ^0.0.7" to clipboard
scan: ^0.0.7 copied to clipboard

outdated

flutter widget to scan qrcode customly.Get qrcode from image path.

scan #

flutter widget to scan qrcode customly.

Get qrcode from image.

Features #

  • use ScanView in widget tree to show scan view.
  • custom identifiable area.
  • get qrcode string 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>
android
<uses-permission android:name="android.permission.CAMERA" />

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

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
    },
  ),
),
  • you can use controller.resume() and controller.pause() resume/pause camera
controller.resume();
controller.pause();
  • get qrcode string from image path
String result = await Scan.parse(imagePath);
  • toggle flash light
controller.toggleTorchMode();

License #

MIT License

174
likes
30
points
18.7k
downloads

Publisher

verified publisherchavesgu.com

Weekly Downloads

flutter widget to scan qrcode customly.Get qrcode from image path.

License

MIT (license)

Dependencies

flutter

More

Packages that depend on scan