title: Flutter: How to get upload / download progress for http requests
body: <p>I am writing an app that uploads an image to a server, and instead of just showing a spinner, I'd love to be able to get progress on the status of that upload.  </p>
  
  <p>Additionally, I want to do this without using Multipart form data. This is the code I'm currently using - but it appears to be stalling out with a broken pipe, and I have zero feedback as to whether data is being sent to the server:</p>
  
  <pre><code>Future&lt;String&gt; _uploadFile(File assetFile) async {
    final url = &lt;removed&gt;;
  
    final stream = await assetFile.openRead();
    int length = assetFile.lengthSync();
  
    final client = new HttpClient();
  
    final request = await client.postUrl(Uri.parse(url));
  request.headers.add(HttpHeaders.CONTENT_TYPE,  "application/octet-stream");
    request.contentLength = length;
  
    await request.addStream(stream);
    final response = await request.close();
    // response prociessing.
  }
  </code></pre>
  
  <p>Is it possible to send large data as a stream without reading it into memory, and can I get progress on that upload with current dart / flutter APIs?</p>