title: How to convert asset image to File?
body: <p>Is there a way to use an asset image as a File.
  I need a File so it can be used for testing it over the internet using http. I've tried some answers from Stackoverflow.com (<a href="https://stackoverflow.com/questions/49835623/how-to-load-images-with-image-file">How to load images with image.file</a>) but get an error 'Cannot open file, (OS Error: No such file or directory, errno = 2)'. The attached code line also gives an error.</p>
  
  <pre><code>File f = File('images/myImage.jpg');
  
  RaisedButton(
     onPressed: ()=&gt; showDialog(
       context: context,
       builder: (_) =&gt; Container(child: Image.file(f),)),
     child: Text('Show Image'),)
  </code></pre>
  
  <p>Using Image.memory widget(works)</p>
  
  <pre><code>Future&lt;Null&gt; myGetByte() async {
      _byteData = await rootBundle.load('images/myImage.jpg');
    }
  
    /// called inside build function
    Future&lt;File&gt; fileByte = myGetByte();
  
   /// Show Image
   Container(child: fileByte != null
   ? Image.memory(_byteData.buffer.asUint8List(_byteData.offsetInBytes, _ 
   byteData.lengthInBytes))
   : Text('No Image File'))),
  </code></pre>