title: Save data to localStorage from api
body: <p>I want to save data on Local Storage to make app works offline.
  I want to get data from api, json data and save them to local storage,
  PostList and Post are my classes </p>
  
  <pre><code>Future &lt;PostsList&gt; fetchPostsList(language) async {
    final response =  
      await http.get('https://sas-survey.urbanway.net/api/questions/1/${language}');
  
    if(response.statusCode == 200){
      // storagepost.setItem('resultPost', response.body);
      return PostsList.fromJson(json.decode(response.body));
    }else{
      // return storagepost.getItem('resultPost');
      throw Exception('Filed to load post');
    }
  }
  final LocalStorage storagee = new LocalStorage('result_app');
  static PostsList resultsListEn = new PostsList();
      _addItemEn( String id,
                  String question,
                  String photo,
                  List answers,
                  String categoryid) {
          setState(() {
            final resulten = new Post(id: id, title: question, image: photo, answers: answers, category: categoryid);
            print(resulten.title.toString());
            resultsListEn.posts.add(resulten);
            _saveToStorageEn();
          });
        }  
        _saveToStorageEn() {
          widget.storagee.setItem('en', resultsListEn.toJsonEncodable());
        }
  new FutureBuilder&lt;PostsList&gt;(
                future: fetchPostsList(en),
                builder: (context, snapshot){
                  if(snapshot.hasData){
                    List&lt;Post&gt; questionsEn =snapshot.data.posts;
                    questionsEn.forEach((question){
                      _addItemEn(question.id, question.title, question.image, question.answers, question.category);
                    });
                    return Center();
                  }else if(snapshot.hasError){
                    return Text("${snapshot.error}");
                  }
                  return CircularProgressIndicator();
                },
              ),
  </code></pre>
  
  <p>this is my code what im missing?</p>