title: Share local image with Flutter
body: <p>I want to share an image that I took from the CameraController. </p>
  
  <p>I location of the file is as example /data/user/0/com.user.test/cache/2019-09-10 16:32:52.281842.png</p>
  
  <p>How it is possible to share this local image? </p>
  
  <p>I added these two line for read/write to local storage: </p>
  
  <pre><code>    &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt;
  </code></pre>
  
  <p>I use the share component from <a href="https://pub.dev/packages/esys_flutter_share" rel="noreferrer">https://pub.dev/packages/esys_flutter_share</a> which works great. </p>
  
  <pre><code>void _sharePicture() async {
      print('Share picture');
      print(this.imagePath);
  
      final ByteData bytes = await rootBundle.load(this.imagePath);
      await Share.file('esys image', 'esys.png', bytes.buffer.asUint8List(), 'image/png', text: 'My optional text.');
    }
  </code></pre>
  
  <p>this.imagePath is the local location of the file: :/data/user/0/com.user.test/cache/2019-09-10 16:32:52.281842.png</p>
  
  <p>Do you first have to save the image? And the use it for sharing? How is it possible to share this local image?</p>