How to solve the image picker crash app error?

前端 未结 4 1722
走了就别回头了
走了就别回头了 2021-01-14 12:41

I have a app crash when i\'m picking a image. i\'m using image_picker:0.5.0+7 with any ImageSource it\'s crash the app.

File _fileState;

Future getIm         


        
4条回答
  •  伪装坚强ぢ
    2021-01-14 13:20

    image_picker plugin does not support camera permission condition anymore. For instance, when we try to access camera from an app, the app asks us for permission. Now, since image_picker plugin has removed that condition, we need to ask the permission manually using permission_handler plugin. Read more details about this change here

    Use this plugin to add the request manually ie runtime and you should be able to get rid of this crash.

提交回复
热议问题