sunderee / mlkit-document-scanner

Flutter plugin bringing MLKit Document Scanner to Flutter
https://pub.dev/packages/mlkit_document_scanner
Apache License 2.0
1 stars 1 forks source link

Bug: No Feedback Mechanism for No Document Selected #3

Open sunderee opened 5 months ago

sunderee commented 5 months ago

Describe the bug When a user does not select a document, the plugin fails to notify the caller of this scenario, leading to a potential state of confusion for the user and the application.

To Reproduce Steps to reproduce the behavior:

  1. Launch the document scanner.
  2. Do not select any document and try to proceed or close the scanner.
  3. Notice that there is no feedback or error message provided to the user or the calling function.

Expected behavior The plugin should provide a clear mechanism (such as a callback or an error) to indicate that no document was selected. This could be used by the application to notify users or handle the scenario appropriately.

Screenshots N/A

Desktop (please complete the following information): N/A

Smartphone (please complete the following information):

Additional context This issue is crucial for improving the plugin's usability and ensuring that applications using it can handle all user interactions gracefully.

sunderee commented 5 months ago

I'm not sure how can I catch the following exception:

E/GmsDocScanDelAct( 5777): Failed to handle scanning result
E/GmsDocScanDelAct( 5777): java.lang.IllegalStateException: Failed to handle result
E/GmsDocScanDelAct( 5777):      at com.google.mlkit.vision.documentscanner.internal.zzg.run(com.google.android.gms:play-services-mlkit-document-scanner@@16.0.0-beta1:12)
E/GmsDocScanDelAct( 5777):      at android.os.Handler.handleCallback(Handler.java:938)
E/GmsDocScanDelAct( 5777):      at android.os.Handler.dispatchMessage(Handler.java:99)
E/GmsDocScanDelAct( 5777):      at android.os.Looper.loopOnce(Looper.java:210)
E/GmsDocScanDelAct( 5777):      at android.os.Looper.loop(Looper.java:299)
E/GmsDocScanDelAct( 5777):      at android.os.HandlerThread.run(HandlerThread.java:67)

For reference, this question has also been posted on Stack Overflow.