-
-
Notifications
You must be signed in to change notification settings - Fork 23
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 do I wait for interconnected commands to end? #24
Comments
@anaisbetts could you please have look at this I'm on vacation |
If they all chain, just listen to the last one. If not, use RxDart's |
I know I need to listen to the last command to get data. But that's not what I'm asking. I want to show loading indicator on the screen until all commands are finished. The Loading indicator will appear when the first command runs and will disappear when the last command finishes its job. That's exactly what I want. I can do this in various ways. But I wanted to ask if there is a practical method. Maybe WidgetSelector or other widgets can be customized for it. |
Do you really need to send/initialize all of those three commands? I'm guessing you're not sending all of those events from UI. If I understand you correctly you want send event to start first command. Then when first command finishes, start second one and after it finish start third one, and finally update UI, am I right? If yes, then you actually don't need three commands! You need one command and a manager/stream that will do the work of calling services and passing the data around. Create a manager that will combine work from those three commands in one Hope that helps. |
If the commands are only called from other commands and are in the same class it doesn't make sense to split them if they are only called sequentially. |
I use interconnected commands to perform a systematic job. For example, one command receives data from the server, the other command prepares the data, and the last command updates the interface.
I want to show loading on the screen until these three commands are finished. I can do it with WidgetSelector for a single command. But I want to wait until more than one command is finished.
How can I make it happen?
The text was updated successfully, but these errors were encountered: