I want to store an object in shared preferences which contains some fields in it like name, age, phone number etc. I don’t know how to store an object in shared preferences in flutter.
You need to serialize it to JSON before saving and deserialize after reading
See https://flutter.io/docs/development/data-and-backend/json for details
Answered By – Günter Zöchbauer
Answer Checked By – Candace Johnson (Easybugfix Volunteer)