Sardar Badar Saghir
Sardar Badar Saghir

Reputation: 65

Flutter app initialization at Onboard Pages?

I want to take user input after user install and launch the app. I want set parameters like language Selection, date etc when he use app for first time.

Upvotes: 0

Views: 209

Answers (1)

Sisir
Sisir

Reputation: 5388

Use SharedPreferences

Have a page to take user inputs about your desired parameteres and ssave them in whereever you want to. While saving that, also store a boolean in SharedPref to indicate whether app is initialized or not.

In main() first you read this value from SharedPref. If the value is present then directly show your app's homepage else show the user input page.

This is similar to apps which have a login screen. In apps the login screen will appear only for the first time till user presses logout.

Check this package: SharedPreference

Upvotes: 1

Related Questions