Skip to content
pubscout

document_scanner

0.2.1, released 5 years ago by eliasteeny.com

A Flutter plugin that creates a native platform view to scan documents.

$ flutter pub add document_scanner
Source repository

What it does

It provides a widget that integrates native platform document scanning functionality directly into Flutter applications. The package captures documents and returns the scanned result via callback.

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

Use it when

  • You need a native document scanning widget inside an Android or iOS Flutter app.
  • You want to capture scanned documents and retrieve them as files or image paths.

Skip it when

  • You need heavy customization of the document scanner options, as customization currently does not work.
  • You need scanning capabilities on web or desktop platforms.

Strengths

  • Simplifies adding document scanning capabilities via native platform views.
  • Returns structured image objects with file conversion helpers.

Weaknesses

  • Document scanner customization options are currently not working.
  • Only supports Android and iOS platforms.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
1

Requires handling camera permissions. For iOS, add io.flutter.embedded_views_preview and NSCameraUsageDescription keys to Info.plist. For Android, ensure minSdkVersion is at least 19.

DocumentScanner(
    onDocumentScanned: (ScannedImage scannedImage) {
        print("document : " + scannedImage.croppedImage);
        File scannedDocument = scannedImage.getScannedDocumentAsFile();
    },
)

Alternatives

Packages that do the same job and could replace document_scanner.

Works with

Packages commonly used together with document_scanner: ones it builds on, ones built on it, and its own family.