Flutter: Best way to rebuild state when the day changes?

Viewed 81

The title says it all. I want my state to automatically rebuild when the clock changes from 23:59:59 to 12:00:00 (the next day). Are there packages that will help me do this? I couldn't find any.

1 Answers

Almost any of the provider families can notify listeners on a particular condition. Have one of those listen to a Timer.periodic(Duration(minutes: 1)) and compare old to new day. If changed, send out a notify.

Related