I'm using image_picker
flutter package but when I use it like the defined example, it does not work. if I call the function for the first time:
ImagePicker.pickImage(source: ImageSource.camera, maxWidth: 600);
I get this error and nothing happends:
PlatformException(error, Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference, null)
And when I call that for the second time I get this error:
PlatformException(already_active, Image picker is already active, null)
sometimes it does not even log any error and just logs and does nothing:
D/ViewRootImpl@abff78a[MainActivity](31877): MSG_WINDOW_FOCUS_CHANGED 0
D/ViewRootImpl@abff78a[MainActivity](31877): MSG_WINDOW_FOCUS_CHANGED 1
D/ViewRootImpl@abff78a[MainActivity](31877): Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 3524769792} changed=false
can anyone help me with this?