bloc
bloc copied to clipboard
Are there any example using bloc with flutter_downloader ?
Hi @bobykurniawan11 👋 Thanks for opening an issue!
I personally am not aware of an example but is there anything in particular that you'd like to see? If you have a sample app which uses flutter_downloader
and are having trouble integrating with bloc, I'm more than happy to take a look and provide suggestions/feedback. Let me know what you think, thanks! 🙏
Hi, @felangel
I would like to make an example app which uses flutter_downloader
with the bloc, can you assign this to me and please let me know what all features will it have?
I am using flutter_downloader. I have a list of song file. So at the list user can download or play. If user click the download button, add the url into flutter_downloader queue and add additional song info into download table in sqlite. Because I need to show other information along with download progress. So my downloaded_songs screen, I call the getDownloadFiles() using bloc but I have no idea how can I combine the list from flutter_downloader and list from bloc. I got the list using BlocBuilder. I need a async await function and wait until finished and return the Container (ListView).
child: BlocBuilder<FavouriteSongBloc, FavouriteSongState>(
builder: (context, state) {
if (state is FavouriteSongError) {
return SomethingWentWrongScreen(error: state.error);
} else if (state is DownloadedSongListLoaded) {
favouriteSongs = state.favouriteSongs;
await _combineList(favouriteSongs); <== here, I want to manipulate the favouriteSongs list before binding the below Container widget.
return const Container() //ListView builder will be here
}
return const CircularProgressIndicatorWidget();
},
)
Closing this for now since it's a really old issue and I'm happy to answer specific questions if folks have them.
Hi
Is there any example available using bloc with flutter_downloader?
Looking for your support...
Thanks.
How to implement the flutter_downloader using bloc?
I have an issue with calling event or state in the port listener.