I'm struggling to put together the following logic, I'm asking university students for help.
I'm putting together a diet app, and on one of the pages I want to show a new recipe every day.
To do this, I have already created my Firestore collection of recipes, but I still don't know how to automatically make it so the application recognizes that the day has changed and thus fetches a new document from Firestore.
I've even thought about how to avoid repeating it, whether it's adding the recipes to an AppState list and always looking for one that's not in the list.
Now the question is: How do I do this logic, so that every time the user enters the application the system recognizes if the day has changed, and if so, loads a new firestore document from my recipe collection, thus filling my widgets with the data from that document?