title: How to Store API model object in Local Storage in flutter?
body: <p>I fatch this issue during use Local Storage(shared_preferences: ^2.0.6) in my code....but i cant store the api model object in local storage...How can i do?</p>
  <pre><code> storeModelInPrefs() async {
      http.Response response =
          await http.get(Uri.parse('http://18.191.193.64/api/view_categories'));
      
      String encodeData = jsonEncode(response.body);
      ///Write Data in local Storage 
      GetStorageUtility.prefs!.write('key', encodeData);
      ///Read Data from local Storage 
      String data = GetStorageUtility.prefs!.read('key');
  
      if (data == null) {
        print('no data in GetStorage');
      } else {
        Map&lt;String, dynamic&gt; map = jsonDecode(data);
        print(map);
      }
    }
  </code></pre>