title: How to use "Image_picker" and "shared_preferences" together in the same project
body: <p>The application works fine when I remove the &quot;Image_picker&quot; dependency.When I add back &quot;shared_preferences&quot; gives an error.</p>
  <p>flutter run --release --verbose</p>
  <p>This error is displayed when starting the application and when I want to use &quot;shared_preferences&quot;.</p>
  <pre><code>[+8288 ms] E/flutter (10416): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: MissingPluginException(No implementation found
  for method getAll on channel plugins.flutter.io/shared_preferences)
  </code></pre>
  <p>&quot;Image_picke&quot; gives this error.</p>
  <pre><code>[   +2 ms] E/flutter (10872): 
  [+18180 ms] E/flutter (10872): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(already_active, Image picker
  is already active, null, null)
  [   +3 ms] E/flutter (10872): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:581)
  [   +1 ms] E/flutter (10872): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158)
  [   +1 ms] E/flutter (10872): &lt;asynchronous suspension&gt;
  [   +2 ms] E/flutter (10872): #2      MethodChannelImagePicker.pickImage
  (package:image_picker_platform_interface/src/method_channel/method_channel_image_picker.dart:29)
  [   +2 ms] E/flutter (10872): &lt;asynchronous suspension&gt;
  [   +1 ms] E/flutter (10872): #3      _PhotoAndNameState.takePicture (package:jokesapp/photoAndName.dart:22)
  [   +1 ms] E/flutter (10872): &lt;asynchronous suspension&gt;
  [   +2 ms] E/flutter (10872): 
  </code></pre>
  <p>The error is fixed if I delete the dependency &quot;Image_picker&quot;. But I have to use &quot;Image_picker&quot;</p>
  <p><a href="https://github.com/flutter/flutter/issues/40339" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues/40339</a>  Someone mentioned this in this issues.
  <strong>My better suggestion is to use your own channel to pick the image from native instead of using the third-party libraries, because sometimes you may get the plugin issues which will not be resolved and need to be waited until the plugin gets updated. Recently i faced the Permissions issue in flutter where i'm using permission_handler and the image_picker, the permission_handler i have used for microphone access, where as the image_picker will have their own permission checker. So when we include both the libraries in the project only one library will work because of the Override method of OnRequest and OnActivity.
  The image_picker works for android 10 only in debug mode.</strong></p>
  <p>But I could not understand exactly what he was talking about. Since I will publish my application, &quot;image_picker&quot; is a safer choice for me.</p>