First you convert the Dart object to a map. Then you convert the map to a JSON string using jsonEncode . Finally, you can save the JSON string to shared preferences as you would any other string.
Read moreHow do I see SharedPreferences data in Flutter?
Implementation
Read more