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

The joystickInnerPosition will move to the center point #18

Closed
zhuwei opened this issue Dec 13, 2019 · 3 comments
Closed

The joystickInnerPosition will move to the center point #18

zhuwei opened this issue Dec 13, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@zhuwei
Copy link

zhuwei commented Dec 13, 2019

Hi.
When I call setstate on my StatefulWidget, the joystickInnerPosition of the JoystickView returns to the center point.

Timer.periodic(Duration(milliseconds: 500), (as) {
	if (mounted) {
	  setState(() {
		_carState = _carState;
	  });
	}
});
@artur-ios-dev artur-ios-dev added the bug Something isn't working label Dec 13, 2019
@artur-ios-dev
Copy link
Owner

Thank you for your report. I will check it out.

@zhuwei
Copy link
Author

zhuwei commented Dec 13, 2019

Please ignore this problem. I should refresh locally

@zhuwei zhuwei closed this as completed Dec 13, 2019
@pickledgator
Copy link

pickledgator commented Mar 12, 2021

What was the solution to this? I'm facing a similar behavior.

My reproduction case:
Every time I call setState((){}) in the parent, while holding the joystick at a deflection, the inner position is reset back to the middle. When an incremental pan is detected, the joystick is immediately deflected again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants