Bloc: Using Refresh Indicator

Created on 25 Apr 2019  路  3Comments  路  Source: felangel/bloc

Hi @felangel,

This isn't a bug but I would like to get a suggestion from you on the right way to use refresh indicator. I have my bloc hooked up with the repository. Upon an event, this will call the API and output various states based on the response. The onRefresh method of RefreshIndicator widget is expecting a Future so I can't use the dispatch there. Please let me know your suggestion.

Thank you!

question

Most helpful comment

My bad. I didn't see that. Thanks much @felangel

All 3 comments

Hey @abinvp 馃憢
Thanks for opening an issue and great question!

You can check out https://felangel.github.io/bloc/#/flutterweathertutorial?id=pull-to-refresh for an example but I need to update the example to manage the completer using BlocListener instead of BlocBuilder.

Hope that helps 馃憤

My bad. I didn't see that. Thanks much @felangel

how to stop/hide the loading when the data already loaded?

Was this page helpful?
0 / 5 - 0 ratings