title: How to get progress event while uploading file on http.MultipartRequest request in flutter
body: <p>I am uploading a file using <code>MultipartRequest</code> from <code>package:http</code>. I am successfully uploading the file but I want to get the progress of the file that is being uploaded. How can I achieve that? My current code looks something like this</p>
  
  <pre><code>Future submitFile(var report, File file) async {
  var uri = Uri.parse(endpoint + "v1/reports");
    var request = http.MultipartRequest("POST", uri);
    await addHeaders(request.headers);
    request.fields.addAll(Report.toMap(report));
    if (file != null)
      request.files.add(await http.MultipartFile.fromPath(
        'report_resource',
        file.path,
      ));
  
    String response = "";
    await (await request.send()).stream.forEach((message) {
      response = response + String.fromCharCodes(message);
    });
    return response;
  }
  </code></pre>
  
  <p>I searched for the solution, found <a href="https://github.com/dart-lang/http/issues/153" rel="noreferrer">this</a>. And <a href="https://stackoverflow.com/questions/50455131/flutter-how-to-get-upload-download-progress-for-http-requests">this</a> post is somehow not similar to what I want to achieve, as he is using different client for the request.</p>
  
  <p>Maybe I am not searching on the right path.
  Help is appreciated.</p>