onFocusGained is fired with a short delay which is undesirable in my case causing the widget to refresh its contents about .5-1sec after the user returns to the screen.
It seems visibility_detector has implemented a default delay which can be overridden by setting the instance updateInterval. This option does not seem to be available in focus_detector.
I was able to workaround this issue by adding the visibility_detector package directly to my project (which is not ideal) and setting the updateInterval from there.
onFocusGained is fired with a short delay which is undesirable in my case causing the widget to refresh its contents about .5-1sec after the user returns to the screen.
It seems visibility_detector has implemented a default delay which can be overridden by setting the instance updateInterval. This option does not seem to be available in focus_detector.
I was able to workaround this issue by adding the visibility_detector package directly to my project (which is not ideal) and setting the updateInterval from there.
VisibilityDetectorController.instance.updateInterval = Duration.zero;