Search packages, repositories and app categories

Package detailsv0.2.1

document_scanner

A plugin that creates a native platform view that scans documents, as a flutter widget.

AndroidiOS
30-day downloads
208
Likes
84
Pub points
140

Install package

flutter pub add document_scanner

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The document_scanner package provides a Flutter widget that integrates native platform views to enable document scanning on Android and iOS. It leverages device camera functionality to detect and capture document edges, offering a seamless way to digitize physical documents within Flutter applications. The plugin is designed for ease of use, with minimal setup required to implement scanning features. It supports real-time edge detection and image processing, making it ideal for apps requiring quick document input.

Use cases

  • Digitizing paper documents in mobile apps
  • Creating document capture features in business tools
  • Enabling receipt scanning in finance apps
  • Integrating document upload workflows
  • Supporting onboarding processes with ID verification

Key features

  • Native platform view integration
  • Real-time document edge detection
  • Cross-platform support (Android & iOS)
  • Simple Flutter widget interface
  • High accuracy in document corner detection

Suitable for

  • Mobile apps needing document capture
  • Business and productivity applications
  • Finance and accounting tools
  • Onboarding and identity verification systems
  • Apps requiring quick photo-to-document conversion

Considerations

  • Requires camera permissions on both platforms
  • May have performance impact on older devices
  • Limited customization of scan UI
  • Depends on native SDKs for core functionality
  • Best results with good lighting and flat document placement

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

document_scanner

A platform view plugin for Flutter apps that adds document scanning functionality on Android/IOS.

Warning

Document Scanner customization options aren't working for now

Setup

Handle camera access permission

IOS

Add a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value true to enable embedded views preview.

<key>io.flutter.embedded_views_preview</key>
<true/>

Add a String property to the app's Info.plist file with the key NSCameraUsageDescription and the value as the description for why your app needs camera access.

<key>NSCameraUsageDescription</key>
<string>Camera Permission Description</string>
Android

minSdkVersion should be at least 19

How to use ?

first add as a dependency in pubspec.yaml

import:

import 'package:document_scanner/document_scanner.dart';

then use it as a widget:

File scannedDocument;

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

Credits

This is a React Native package implemented on Flutter.

Reference to the React Native package : https://github.com/Michaelvilleneuve/react-native-document-scanner

Contributing

Step 1
  • Fork this project's repo : https://github.com/eliasteeny/flutter_document_scanner
Step 2
  • Create a new pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.