Flutter app initialization at Onboard Pages?

Issue

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.

Solution

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

Answered By – Sisir

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *