Skip to content

[image_picker] handling of permission denied is inconsistent between Android and iOS #34425

@jmacpherson

Description

@jmacpherson

Steps to Reproduce

  1. Invoke ImagePicker.pickImage(source: ImageSource.gallery)
  2. Deny permission

Results:
On iOS, a PlatformException is thrown when the permission is denied, or on subsequent attempts to invoke this method.
On Android, the method simply returns null.

[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F203, locale en-CA)
    • Flutter version 1.5.4-hotfix.2 at /Users/jm/.flutterio/flutter
    • Framework revision 7a4c33425d (6 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/jm/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • ios-deploy 1.9.4
    • CocoaPods version 1.6.1

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] Connected device (2 available)
    • ONEPLUS A5010         • 22102a4d                             • android-arm64 • Android 9 (API 28)
    • iPad (5th generation) • B2B6BD7E-E48C-45AB-BDD0-D13AC4E48B0A • ios           •
      com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions