title: PlatformException when using Flutter share plugin to share files
body: <p>I'm trying to create an image from a widget and store it to a file. Then allow the user to share the image. We are using Flutter official share plugin:
  <a href="https://pub.dev/packages/share" rel="nofollow noreferrer">https://pub.dev/packages/share</a></p>
  <p>Here is my main logic:</p>
  <pre><code>  void _convertReportToImageAndShare() async {
      final RenderRepaintBoundary renderRepaintBoundary =
          _containerKey.currentContext.findRenderObject();
      final image = await renderRepaintBoundary.toImage();
      final byteData = await image.toByteData(format: ImageByteFormat.png);
      final pngBytes = byteData.buffer.asUint8List();
      final tempDir = (await getTemporaryDirectory()).path;
      final filePath = '$tempDir/image.png';
      final file = await File(filePath).create();
      file.writeAsBytesSync(pngBytes);
      await Share.shareFiles([filePath]);
    }
  </code></pre>
  <p>This function could be run successfully on a iOS simulator. However, when running on Android device, there is a PlatformException thrown:</p>
  <pre><code>The following PlatformException was thrown:
  PlatformException(error, Couldn't find meta-data for provider with authority
  {my application id}.flutter.share_provider, null, java.lang.IllegalArgumentException:
  Couldn't find meta-data for provider with authority
  {my application id}.flutter.share_provider
      at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:662)
      at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:635)
      at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:441)
      at io.flutter.plugins.share.Share.getUrisForPaths(Share.java:128)
      at io.flutter.plugins.share.Share.shareFiles(Share.java:69)
      at io.flutter.plugins.share.MethodCallHandler.onMethodCall(MethodCallHandler.java:42)
      at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
      at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
      at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:738)
      at android.os.MessageQueue.nativePollOnce(Native Method)
      at android.os.MessageQueue.next(MessageQueue.java:326)
      at android.os.Looper.loop(Looper.java:160)
      at android.app.ActivityThread.main(ActivityThread.java:6718)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
   )
   
   When the exception was thrown, this was the stack:
   #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
   #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
   &lt;asynchronous suspension&gt;
  </code></pre>
  <p>I have checked the source code and the share_provider is defined in
  <a href="https://github.com/flutter/plugins/blob/master/packages/share/android/src/main/AndroidManifest.xml" rel="nofollow noreferrer">https://github.com/flutter/plugins/blob/master/packages/share/android/src/main/AndroidManifest.xml</a></p>
  <p>How could I solve this problem? Do I need to modify something in AndroidManifest.xml? Thanks!</p>