Closed
Description
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 using flutter-pi
on Rpi3 it shows 0, 2, 4, 6
etc every 4s. whereas on console values 1, 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.