bloc icon indicating copy to clipboard operation
bloc copied to clipboard

Are there any example using bloc with flutter_downloader ?

Open bobykurniawan11 opened this issue 4 years ago • 3 comments

bobykurniawan11 avatar Jan 03 '21 06:01 bobykurniawan11

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! 🙏

felangel avatar Jan 06 '21 03:01 felangel

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?

thisisamank avatar Jan 27 '21 18:01 thisisamank

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();
            },
          ) 

alexaung avatar Jun 20 '22 20:06 alexaung

Closing this for now since it's a really old issue and I'm happy to answer specific questions if folks have them.

felangel avatar Apr 15 '23 19:04 felangel

Hi

Is there any example available using bloc with flutter_downloader?

Looking for your support...

Thanks.

sathya4code avatar Feb 02 '24 02:02 sathya4code

How to implement the flutter_downloader using bloc?

I have an issue with calling event or state in the port listener.

balajiks-dev avatar Feb 02 '24 03:02 balajiks-dev