-
-
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
Question: Get notice when command is executed #35
Comments
what about using isExecuting.where(x=>0==false).take(1)? do that in a getter so that it is executed everytime? |
Hi @escamoteur , thanks for the answer. Here's solution I've came up so far. I'm sure it can be optimized but don't yet no ideas
Even if I add delay after getHistoryCommand.execute() it still fires isExecuting = false first. So I have to put take(2) instead of take(1) |
Ah, that is interesting. Not sure if I should count this as an error. getHistoryCommand.isExecuting.distinctUnique.where((b) => b == false).take(1).last Then it won't break in case I deide to remove the initial emitting of false. Great that this works for you. |
I guess supposed behavior is to emit initially false only if command isn't executing.
Will do in my project as extension anyway. |
Good idea! |
Hey @escamoteur , just another observation in regards of commands flow. If I run command BEFORE widget if built for the first time - there are problems with creating RxLoader. As a workaround solution - command should be launched in init state after widget is built once. Like this: Guess there's nothing to do here since moving all streams to behavior subjects would be an overkill. Or not? |
Did you set the parameter |
ah, you already did it ) It works, thanks! |
RefreshIndicator widget requires parameter Future in order to function (finish circling value received).
I'm wondering if there is a way to make RxCommand friend with RefreshIndicator.
Problem is that once I call execute() for my command I get void result.
What I want to do is call command and return Future with null emitted once command finishes with data or error.
The text was updated successfully, but these errors were encountered: