title: How to get Image from URL to a File in Flutter?
body: <p>I have an image saved on Firebase Storage. How can I assign this URL of the image file to a File?</p>
  
  <p>Is there some way to do it as:</p>
  
  <pre><code>File file = File(URL);
  </code></pre>
  
  <p>I've also tried using http, but results in an error : 'FileSystemException was thrown resolving an image codec: Cannot open file'</p>
  
  <pre><code>final http.Response responseData = await http.get(url);
  Uint8List uint8list = responseData.bodyBytes;
  File file = File.fromRawPath(uint8list);
  </code></pre>
  
  <p>Using Uint8list has valid data, as seen when using widget shown below,
  but gives an error when used with above code, File.fromRawPath(unint8list)</p>
  
  <pre><code>Image.memory(uint8list);
  </code></pre>
  
  <p>Tried using ImageProvider but can't get a File object from it:</p>
  
  <pre><code>ImageProvider imageProvider = NetworkImage(url);
  </code></pre>