doc_scan_flutter
2.0.0, released 6 months ago by an unverified publisher
Scan documents with automatic edge detection, cropping, and color enhancement via native APIs.
What it does
Provides a Flutter plugin to scan documents as PDF or JPEG using ML Kit on Android and VisionKit on iOS. It automatically detects edges, crops images, and enhances colors.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to allow users to scan physical documents in your Flutter app.
- You want automatic edge detection and image enhancement using native platform APIs.
Skip it when
- You need custom non-document barcode scanning or general camera preview integration.
- You require complex cross-platform custom UI overlays for document capture that native APIs do not support.
Strengths
- Uses native platform APIs (ML Kit on Android and VisionKit on iOS) for high-quality scans.
- Supports both PDF and JPEG output formats.
Weaknesses
- Requires platform-specific setup such as modifying Podfiles and Android build.gradle files.
- Scanned files are stored in a temporary folder and need manual persistence if required long-term.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires modifying iOS Podfile for platform version and camera permissions, updating Info.plist with NSCameraUsageDescription, and setting minimum SDK version 21 in Android build.gradle.
import 'package:doc_scan_flutter/doc_scan.dart';
try {
List<String>? result = await DocumentScanner.scan();
} on DocumentScannerException {
// Something went wrong
}Alternatives
Packages that do the same job and could replace doc_scan_flutter.
- mobile_scanner
Choose mobile_scanner if you need barcode and QR code scanning rather than document scanning.
95Compare - camera
Choose camera if you need full programmatic control over the device camera preview and custom image capturing instead of a pre-built document scanner.
95Compare
Works with
Packages commonly used together with doc_scan_flutter: ones it builds on, ones built on it, and its own family.