title: Flutter desktop file download from url
body: <p>I use flutter <a href="https://pub.dev/packages/download" rel="nofollow noreferrer">download</a>, <a href="https://pub.dev/packages/http" rel="nofollow noreferrer">http</a> packages for this project</p>
  <pre><code>download: ^0.0.1+1
  http: ^0.13.5
  </code></pre>
  <pre><code>Future&lt;String&gt; downloadFile(String mainURL) async {
      File fileFromURl = File(mainURL);
      String fileName = basename(fileFromURl.path);
      final webthumnailURLImage = await http.get(Uri.parse(thumnailURL));
      final stream = Stream.fromIterable(webthumnailURLImage.bodyBytes);
      download(stream, fileName);
  }
  </code></pre>
  <p>For the web, it's working correctly but for the desktop is not working. How to code for download file on the desktop</p>