Published in


Store JSON Data in Shared Pref

In this article we will discuss about how to store json data in shared preferences in flutter.

🎥 Video Tutorial

🛠️ Dependencies

🔭 Implementation

  1. Create basic UI page with a button.

2. Create model class.
Let’s create a model class that defines the structure of our data that we will be using to storing inside shared preferences.

3. Define raw JSON and default JSON data in separate dart files.

4. Define shared preferences.

5. Update the onpressed event in UI page.

Well that’s it. 🥳🎉

This is how we can store JSON data inside shared preferences in flutter.

Get the complete source code here : 👉

Check out all my Flutter related blogs here.,👇



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vijay R

Vijay R


Hai👋 I’m a flutter developer experienced in designing and developing stunning mobile apps. Reach out for freelance projects: