http icon indicating copy to clipboard operation
http copied to clipboard

Progress for web not working when download file

Open alex9153 opened this issue 1 year ago • 1 comments

	```

var client = http.Client();

	var request = http.Request("GET", Uri.parse("$root/$uri"));

	client.send(request).then((response) {
		double progress = 0.0;
		int receved = 0;
		
		response.stream.listen((value) {
		        receved += value.length;
		        progress = receved / contentLength;
                    }

Handler of response.stream.listen called once with all downloaded bytes

alex9153 avatar Sep 15 '24 14:09 alex9153

Unfortunately, that is a limitation of the underlying XMLHttpRequest implementation. I believe that package:fetch_client does not have this issue.

brianquinlan avatar Oct 17 '24 20:10 brianquinlan

Fixed by #1401

mraleph avatar Nov 15 '24 14:11 mraleph