title: Flutter Image picker is already active, null exception
body: <p>In my flutter project I am getting exception whenever I am trying to pickup an image either from Camera or Gallery using the <code>image_picker</code> plugin of flutter.</p>
  
  <p>For the very first time it asks for the permission and when I allow the camera it throws </p>
  
  <blockquote>
    <p>java.lang.NullPointerException: 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</p>
  </blockquote>
  
  <p>After that, it throws an exception for every subsequent tries</p>
  
  <blockquote>
    <p>PlatformException(already_active, Image picker is already active,
    null)</p>
  </blockquote>
  
  <p>If I try to choose the camera or gallery even after restarting the app.</p>
  
  <pre><code>var imageSource;
  if (source == CAMERA_SOURCE) {
      imageSource = ImageSource.camera;
  } else {
      imageSource = ImageSource.gallery;
  }
  
  try {
       final file = await ImagePicker.pickImage(source: imageSource);
       if (file == null) {
       throw Exception('File is not available');
   }
  </code></pre>
  
  <p>Below are the dependencies:</p>
  
  <pre><code>cupertino_icons: ^0.1.2
  firebase_auth: ^0.8.1
  cloud_firestore: ^0.9.0+1
  firebase_core: ^0.3.0+1
  firebase_messaging: ^3.0.1
  firebase_storage: ^2.0.1
  intl_translation: ^0.17.3
  http: ^0.12.0+1
  xml: ^3.3.1
  uuid: ^2.0.0
  shared_preferences: ^0.5.1+1
  flutter_staggered_grid_view: ^0.2.7
  google_sign_in: ^4.0.1
  flutter_signin_button: ^0.2.5
  image_picker: ^0.5.0+2
  mlkit: ^0.9.0
  path_provider: ^0.5.0+1
  </code></pre>
  
  <p>Thanks for your time! I also tried to upgrade my flutter to the latest version.</p>