I've been developing a Flutter mobile App, and I'm using the Firebase Cloud Firestore to deliver "cards" on the app. But I need to create a "rule" to change for another card each 24 hours, or if possible, to change every midnight in the user's time.

I don't know how I can do this... if I create a code for this in the app, will not this restart the timer always the user restart the app?

Please, if the solution is in Flutter/Firebase docs, invite me the link, I didn't find nothing about this.

Thank you.