document_scanner
0.2.1, released 5 years ago by eliasteeny.com
A Flutter plugin that creates a native platform view to scan documents.
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.
- cunning_document_scanner
Scan paper documents and convert them to images or PDFs with auto-cropping.
92Compare - flutter_genius_scan
Flutter plugin for the Genius Scan SDK for iOS and Android. It allows scanning paper documents using a smartphone camera.
89Compare - flutter_document_reader_api
Scan and read identification documents and passports using the device camera.
84Compare - flutter_mrz_scanner
Scan Machine Readable Zones from identity documents on iOS and Android.
72Compare
Works with
Packages commonly used together with document_scanner: ones it builds on, ones built on it, and its own family.