edufolly / flutter_mobile_vision

Flutter implementation of Google Mobile Vision.
MIT License
455 stars 168 forks source link

Crash when the permission is not granted on Android #7

Closed g123k closed 6 years ago

g123k commented 6 years ago

Hello,

On Android, the first time the application is opened (or if the camera permission is never granted), the app will crash.

In the onActivityResult method, if the resultCode is an error, you are never checking if the intent is null. In the case where the permission is not granted, the intent is null, so the app will crash.

edufolly commented 6 years ago

@g123k thanks for you pull request. I'll analyze and merge as soon as possible.

edufolly commented 6 years ago

@g123k Merged! I'll create a fix to flutter package.

edufolly commented 6 years ago

Fixed in version 0.1.1