-
-
Notifications
You must be signed in to change notification settings - Fork 172
State not reflected when there is no user input #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
Comments
That's interesting. I actually think this is not caused by the missing user action, but because of some kind of bug in the vsync-waiter. Could be that somehow frames get dropped when no other frames are scheduled at that moment, or somehow 2 frames get drawn immediately after each other, so that the first one isn't visible. If you press the action button to increment the counter, there's a bunch of frames being rendered so one wouldn't notice if a few were missing. I'll look into it |
Implemented vsync some time ago, just forgot to upload it. oops |
Thank you! Can confirm this is fixed on latest |
Unfortunately this seems to break touch on my monitor. FAB in the counter app doesn't work anymore. Going back to commit 530049f fixes the with tap, but then |
When
setState
is called from code instead of on user action (like mouse click or screen tap), first execution is not reflected in the UI.Here is counter project modified to automatically increment counter value every 2s: https://github.com/dluksza/flutter_auto_refresh
On android emulator everything works fine UI shows
0, 1, 2, 3, 4, 5
etc. every 2s. But when the same code is run usingflutter-pi
on Rpi3 it shows0, 2, 4, 6
etc every 4s. whereas on console values1, 2, 3, 4
etc. are printed every 2s.This also means that other automatic UI updates will not be reflected until another
setState
is called.The text was updated successfully, but these errors were encountered: