-
Notifications
You must be signed in to change notification settings - Fork 88
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
Programmatically stop and start fails #47
Comments
Hi @alexlipa91, I'm struggling to reproduce this one. Would you be able to share a full example? . The listeners are registered during the |
I have the same problem. I get this error if I have multiple RoundedLoadingButtonController in the widget. Is it known issue ? |
@chrisedg87 I also have a bunch of logs for this error in Sentry, although I haven't been able to reproduce it myself. We also have several Looking through the code, it's possible that this line: widget.controller._addListeners(_start, _stop, _success, _error, _reset); needs to be further up. I don't use BehaviorSubject much myself, but my understanding is that when a listener is registered to one, it immediately emits the last state that was in it. In I could be wrong but it's worth a look. |
@chrisedg87 I think the issue is when you call stop on a controller where the button widget has not been initialized. So let's say you have a grid of buttons, I dunno ....like 8 of them. So you instantiate 8 controllers. But maybe because of some app logic you don't build the actual buttons - only 4 of them are showing. If you try to stop any of the 4 that were never rendered, you'll get this error. We can track it on our end but it's a bit annoying where an alternative of just not stopping a button that has no stop listener seems better. (cc @alexobviously) |
I would like to start the button animation and stop it after a
ModalBottom
has been shown.When the modal is shown, if I press outside the modal (basically it pops it from the stack) the button would continue to run. That is why I added
controller.reset()
.This works fine the first time. However if I do this same thing twice I get
This is the
onTap
function for the buttonI have tried
controller.stop()
as well ascontroller.reset()
but same outcomeThe text was updated successfully, but these errors were encountered: