Flutter: Read the Stream data of a BloC state and re-render the UI if it changes
问题 I have a problem with using the BloC pattern in combination with showing a download process using Dio. Can anybody tell me, how to get the onUploadProgress from dio into a bloc state and display it when the progress inside the state updates? At the moment I have the UI, the BloC and an API class. I need to pass my bloc into the API call to download a file and then add an extra event like so: onReceiveProgress: (int received, int total) => { bloc.add(DownloadingImages((received / total) * 100)