apple_vision_document_scanner 0.0.1
apple_vision_document_scanner: ^0.0.1 copied to clipboard
A Flutter plugin for scanning documents using Apple VisionKit on iOS devices.
apple_vision_document_scanner #
A Flutter plugin for scanning documents using Apple VisionKit on iOS devices.
Features #
- Scan multi-page documents using the native iOS document camera.
- Returns scanned images as PNG files.
- Simple API for integration with Flutter apps.
Supported Platforms #
- iOS (requires iOS 13.0+ and a real device; not supported in the simulator)
- Android: Not supported.
Installation #
Add to your pubspec.yaml:
dependencies:
apple_vision_document_scanner: ^<latest_version>
Then run:
flutter pub get
Usage #
import 'package:apple_vision_document_scanner/apple_vision_document_scanner.dart';
final scanner = AppleVisionDocumentScanner();
void scanDocuments() async {
try {
final scannedFiles = await scanner.scan();
// Use scannedFiles (List<File>) as needed
} catch (e) {
// Handle errors (e.g., show a dialog)
}
}
Example #
See the example directory for a complete Flutter app using this plugin.
iOS Setup #
Add the following to your ios/Runner/Info.plist:
<key>NSCameraUsageDescription</key>
<string>We need camera access to scan documents.</string>
Limitations #
- Simulator is not supported. You must use a real device for document scanning.
- Only iOS is supported.
License #
The 3-Clause BSD License
Contributing #
Pull requests and issues are welcome!