How do I update my app state every new day?

Custom Code
Resolved

Hi everybody,

I am building an application part of which has a 'Quote of the Day' which is meant to refresh every day randomly from a list (stored in an app state variable). The way it works is that I have 2 app state, one with the list and one is empty. I run a custom action which randomly picks a number and I update the empty app state with that index from the list. The only problem is calculating and running this action every new day (even if has not been exactly 24 hours or more since the user opened the app). How do I do that?

Any help is appreciated.

Thanks!

What have you tried so far?
  • Having a 'daySinceLastVisit; & 'lastVisit' variables which update daily - but doesn't seem to work properly for some reason

Did you check FlutterFlow's Documentation for this topic?
Yes
1
3 replies