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

When use method rollTo reset roulette #14

Closed
Anullos opened this issue Oct 15, 2022 · 3 comments
Closed

When use method rollTo reset roulette #14

Anullos opened this issue Oct 15, 2022 · 3 comments

Comments

@Anullos
Copy link

Anullos commented Oct 15, 2022

Hello, I am using this package and I notice that when using the "rollTo" method the spinner resets and spins instead of continuing where it was going.

Any idea how to make the roulette continue where it was and not see that reset screenshot?

I think that the problem maybe is in _controller.forward(from: 0) instead of current index.
Future<void> rollTo( int targetIndex, { Duration duration = defaultDuration, int minRotateCircles = defaultMinRotateCircles, bool clockwise = true, Curve? curve = Curves.fastOutSlowIn, double offset = 0, }) async { final targetRotate = calculateEndRotate( group, targetIndex, clockwise, minRotateCircles, offset: offset, ); _controller.duration = duration; _animation = makeAnimation(_controller, targetRotate, curve); notifyListeners(); **await _controller.forward(from: 0);**}``

Thank very much

@do9core
Copy link
Owner

do9core commented Oct 16, 2022 via email

@Anullos
Copy link
Author

Anullos commented Oct 16, 2022

Now it's perfect!!!!
Thank you very much
So it looks more natural and better :)

@do9core
Copy link
Owner

do9core commented Oct 21, 2022

I'v published the version 0.1.3 to fix this.
You can upgrade to that version now and, I'm closing this issue.
If you have any other questions about this issue, please re-open, thanks :)

@do9core do9core closed this as completed Oct 21, 2022
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