Open UlanNurmatov opened 3 years ago
Noticed the warning in Readme. Are you planning to bring customization back soon?
Hello, you're welcome.
Yes, I'm planning to bring back customization, but my free time is very limited. Concerning the unexpected behavior, I'll try to resolve it asap. It would really help me if you can share the app's log when this behavior occurs.
Here's a video where I test the plugin: https://youtu.be/HEzyGN9dLto
Below is the code that I simplified just to get the scanned image path. But my code doesn't work, the plugin works on its own.
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:document_scanner/document_scanner.dart';
import 'package:permission_handler/permission_handler.dart';
class MyAppp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyAppp> {
Future<PermissionStatus> cameraPermissionFuture;
Future<Map<Permission, PermissionStatus>> statuses;
File scannedDocument;
@override
void initState() {
// cameraPermissionFuture = Permission.camera.request();
// storagePermissionFuture = Permission.storage.request();
_requestPermission();
super.initState();
}
_requestPermission() {
statuses = [
Permission.camera,
Permission.storage,
].request();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: scannedDocument == null
? DocumentScanner(
onDocumentScanned: (ScannedImage scannedImage) {
setState(() {
scannedDocument =
scannedImage.getScannedDocumentAsFile();
});
},
)
: Center(child: Text(scannedDocument.path))));
}
}
Hello, you're welcome.
Yes, I'm planning to bring back customization, but my free time is very limited. Concerning the unexpected behavior, I'll try to resolve it asap. It would really help me if you can share the app's log when this behavior occurs.
Any update? This is probably the best rectangle recognition plugin, would be great if it worked as expected.
@UlanNurmatov try version 0.1.1, the unexpected behavior should be resolved.
Hi. Thanks for the plugin. I have a few issues:
1) The cropped images are greyscale. Can we make it color?
2) I tried to use code from example app. The initial image capture and cropping works great. After that, the circular progress indicator doesn't disappear. "retry" text doesn't appear. Also a random image is taken without cropping.
3) Enhancement. Is there a way to manually start and and stop the rectangle detection?
Below is the code that I've slightly modified.