Skip to content
pubscout

scan

1.6.0, released 5 years ago by chavesgu.com

Scan QR codes and barcodes within the widget tree and decode images from file paths.

$ flutter pub add scan
Source repository

What it does

Provides a ScanView widget to scan QR codes and barcodes directly from the camera feed with custom styling options. Also allows decoding QR codes and barcodes from image file paths programmatically.

AI-written summary of version 1.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to embed a QR or barcode scanner inside a custom widget layout.
  • You need to decode QR or barcode data from an existing image path on the device.

Skip it when

  • You want to generate QR code images (use qr_flutter instead).

Strengths

  • Customizable scan area scale and scan line colors.
  • Supports decoding barcodes and QR codes from image paths.
  • Includes torch toggle and pause/resume controller functions.

Weaknesses

  • Requires platform-specific configuration for camera usage on iOS and Android.
  • Limited to scanning and parsing functionalities.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

Requires adding NSCameraUsageDescription and io.flutter.embedded_views_preview to iOS Info.plist, and the CAMERA permission to the Android Manifest.

ScanController controller = ScanController();
Container(
  width: 250,
  height: 250,
  child: ScanView(
    controller: controller,
    scanAreaScale: .7,
    scanLineColor: Colors.green.shade400,
    onCapture: (data) {},
  ),
);

Alternatives

Packages that do the same job and could replace scan.