Run script before show the first page? [SOLVED]

Resolved

Is there a way to perform an action before shown the first page?

I want to check if it is the first use of the app and route to a specific page (basic configuration). If is a returning user (configuration was done before), the first page will be other.

I made a workaround, but it is ugly: I created a page with an empty container with an action at "on load", but it blinks before showing the correct page.

I thought that I could insert this at main.dart, after "await appState.initializePersistedState();", but the editor is read-only.

Thanks.

3
4 replies