What block can I put here?

I have a login screen but I want when the user makes login / signup the app makes autologin until the user logout. This means that after the splash screen (screen1) animation if the user is loged in he goes to the main screen (home) if not he goes to the login screen! I use firebase (idk if this helps :slight_smile:)
What can I put in the "if"?

use tinydb

when user log in success use true in tinydb with specific tag.
and call this tah after the animation ends.
I mean, when animation ends,
If call tinydb call tag logged in, if value not found set false
open screen home
else open screen login

image