Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle refresh indicator? #20

Closed
TheHemantKaushik opened this issue Mar 29, 2019 · 6 comments
Closed

How to handle refresh indicator? #20

TheHemantKaushik opened this issue Mar 29, 2019 · 6 comments

Comments

@TheHemantKaushik
Copy link

TheHemantKaushik commented Mar 29, 2019

I want to show a refresh indicator when command is in progress. How can we handle that?

@escamoteur
Copy link
Collaborator

You mean a loading spinner? Subscribe to the yourCommand.isExecuting and show/hide your spinner depending on the value you get.
Even easier is the use of a RxCommandListener which has a direct handler onIsBusy and onIsNotBusy

@TheHemantKaushik
Copy link
Author

Hi @escamoteur, thanks for the reply !

Listening an isExecuting event is easy and RxCommandListener is more. I am heavily using rx_command and rx_widgets packages in my app.

The confusion is with RefreshIndicator widget. It needs a future object to show indicator. I need it to am implement swipe-to-refresh.

@escamoteur
Copy link
Collaborator

Sorry I somehow missed this. Did you solve your problem in the meantime?

@TheHemantKaushik
Copy link
Author

I made some jugaad for that, but didn't find the right solution yet.

@escamoteur
Copy link
Collaborator

So you want that the RxCommand is passed as a Future to the RefreshIndicator?

@escamoteur
Copy link
Collaborator

you could just use the .next Property of the command I guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants