Is there a way to store id value from http response which can be accessed from any page?

Issue

I’m new to flutter is there a way to store id value from http response which can be accessed from any page ?. When login the response comes with an ID, I needed that id in various pages in flutter. Is it possible to store it and get the scope from all over the application>

Solution

Use SharedPreferences to persist application related data. This would be cleared once user clears data of the app.

Answered By – Arvind

Answer Checked By – Mary Flores (FlutterFixes Volunteer)

Leave a Reply

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