document_scanner 0.1.0
document_scanner: ^0.1.0 copied to clipboard

Flutter Android iOS

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

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();
    },
                          
)

Contributing #

Step 1 #

Step 2 #

  • Create a new pull request.

License #

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

9
likes
90
pub points
74%
popularity

Publisher

eliasteeny.com

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_plugin_android_lifecycle

More

Packages that depend on document_scanner