v0.4.0document_scanner_flutter
Um plug-in de scanner de documentos e detecção automática para Android e iOS no Flutter.
158Curtidas 140Downloads em 30 dias130Pontos Pub
AndroidiOS
Um plug-in de digitalização de documentos para o flutter
Texto original em inglês. Visite o GitHub para a versão atual.
A document scanner + PDF generator plugin for Flutter. Supports Android and iOS with auto edge detection, cropping, B&W filter, and PDF generation.

| Platform | Minimum Version |
|---|---|
| Android | API 21 (Android 5.0) |
| iOS | iOS 12.0 |
| Flutter | 3.0.0 |
| Dart | 2.17.0 |
document_scanner_flutter: ^0.4.0
final File? scannedDoc = await DocumentScannerFlutter.launch(context);
// returns null if user cancels
final File? scannedDoc = await DocumentScannerFlutter.launch(
context,
source: ScannerFileSource.CAMERA, // or ScannerFileSource.GALLERY
);
final Uint8List imageBytes = await myFile.readAsBytes();
final File? rescanned = await DocumentScannerFlutter.launch(
context,
source: ScannerFileSource.CAMERA,
initialImage: imageBytes,
canBackToInitial: true,
);
// Call this on app startup to recover image lost due to process death
final File? recovered = await DocumentScannerFlutter.retrieveLostData();
if (recovered != null) {
// use recovered image
}
final File? pdfFile = await DocumentScannerFlutter.launchForPdf(
context,
source: ScannerFileSource.CAMERA,
);
// returns a PDF File or null if cancelled
final File? scannedDoc = await DocumentScannerFlutter.launch(
context,
source: ScannerFileSource.CAMERA,
labelsConfig: {
ScannerLabelsConfig.ANDROID_NEXT_BUTTON_LABEL: 'Next',
ScannerLabelsConfig.ANDROID_SAVE_BUTTON_LABEL: 'Save',
ScannerLabelsConfig.ANDROID_ROTATE_LEFT_LABEL: 'Rotate Left',
ScannerLabelsConfig.ANDROID_ROTATE_RIGHT_LABEL: 'Rotate Right',
ScannerLabelsConfig.ANDROID_ORIGINAL_LABEL: 'Original',
ScannerLabelsConfig.ANDROID_BMW_LABEL: 'B & W',
ScannerLabelsConfig.PICKER_CAMERA_LABEL: 'Camera',
ScannerLabelsConfig.PICKER_GALLERY_LABEL: 'Gallery',
ScannerLabelsConfig.PICKER_CANCEL_LABEL: 'Cancel',
ScannerLabelsConfig.ANDROID_INITIAL_IMAGE_LOADING_MESSAGE: 'Loading image...',
},
);
See CHANGELOG.md for full release history.
Lista de dependências 5 itens
{"sdk":"flutter"}^3.10.4^0.14.0^2.1.3{"sdk":"flutter"}Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗