flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
935 stars 715 forks source link

Scan document from Gallery in google_mlkit_document_scanner #655

Open loveoverflowdev opened 1 month ago

loveoverflowdev commented 1 month ago

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:

bensonarafat commented 3 weeks ago

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