flutter-form-builder-ecosystem / form_builder_file_picker

File picker field widget for FlutterFormBuilder.
https://pub.dev/packages/form_builder_file_picker
BSD 3-Clause "New" or "Revised" License
15 stars 33 forks source link

Android 13 Granular Permission Exception #59

Closed wpfilf closed 1 year ago

wpfilf commented 1 year ago

Dear awesome Flutter Form Builder People!

Not sure how to fix this issue. I'm trying to open photos from my Android 13 device and getting an exception that Storage Permission is not granted. Do you maybe have an idea how to fix this behaviour?

Package version:

flutter_form_builder: ^7.8.0 form_builder_file_picker: ^2.4.0 form_builder_extra_fields: ^8.5.0

Flutter doctor ``` [✓] Flutter (Channel stable, 3.7.3, on macOS 13.2 22D49 darwin-arm64, locale de-DE) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] IntelliJ IDEA Community Edition (version 2021.3) [✓] VS Code (version 1.76.1) [✓] Connected device (3 available) [✓] HTTP Host Availability ```
Code sample FormBuilderFilePicker( name: 'fieldName, onChanged: (value) { //do something }, typeSelectors: [ TypeSelector( type: FileType.image, selector: Row( children: [ const Icon( Icons.add_circle, size: 20, ), const SizedBox(width: 5), Text( 'Choose Photo...', ), ], ), ), ], onFileLoading: print, ) ```dart ```

Description

Expected behavior:

FormBuilderFilePicker checks for READ_MEDIA_IMAGES Permission

READ_MEDIA_IMAGES

Current behavior:

Exception gets thrown: Storage Permission not granted

Steps to reproduce

  1. Try to open Photo with FormBuilderFilePicker on ANDROID 13

Stacktrace/Logcat

Exception: Storage Permission not granted