flutter-ml/google_ml_kit_flutter

Scan document from Gallery in google_mlkit_document_scanner

loveoverflowdev opened this issue · 3 comments

Title
In google_mlkit_document_scanner, I failed to enable document scanning from Gallery Instead of Camera

Description
In the google_mlkit_document_scanner package, I need to scan documents from the gallery instead of using the camera. I have set the boolean isGalleryImport to true in the source code, which is based on the ML Kit example. However, there is no gallery icon button visible to press for importing images from the gallery.

To Reproduce
Steps to reproduce the behavior:

  1. Clone google_ml_kit_flutter from github repository
  2. cd to google_ml_kit_flutter/packages/example
  3. Edit packages/example/lib/vision_detector_views/document_scanner_view.dart: Change isGalleryImport to true
    image
  4. Run flutter build apk and then flutter install to launch ML Kit Flutter example on real Android device
  5. See error: There is no gallery icon button to press for importing images from the gallery even after setting isGalleryImport to true.

Screenshots
image

Expected behavior
Appear Gallery icon button to pick image from Gallery

Platform:

  • OS: Android
  • Device: Samsung Galaxy A50
  • OS: Android 11
  • Flutter/Dart Version: Flutter 3.19.6 • channel stable
  • Plugin version: google_mlkit_document_scanner 0.2.0

WhatsApp Image 2024-08-10 at 1 34 54 PM

This is the result of a test I made.
This seems to be working on my end.
Every possibility is can be from the device itself @loveoverflowdev

This issue is stale because it has been open for 30 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.