title: How can i save shared prefrence in list?
body: <p>i have two class , in first class set sharedPrefrence like this :</p>
  
  <pre><code>[{"name":"alex","code":"12345"}]
  </code></pre>
  
  <p>my shared prefrence set method :</p>
  
  <pre><code>  Future _shared() async {
    final _customer = {
    "name": _controller1.text,
    "code": _controller2.text,
  };
    List&lt;Map&lt;String, dynamic&gt;&gt; customers = [];
    customers.add(_customer);
  
  
   final customerEncode = jsonEncode(customers);
  
   SharedPreferences pref = await SharedPreferences.getInstance();
   pref.setString("list_customer", customerEncode);
  
   print(customerEncode);
  }
  </code></pre>
  
  <p>and show this list in second class , i want when back to first class and enter name and code , they are add to previous list(keep later data) like this :</p>
  
  <pre><code>[{"name":"alex","code":"12345"},{"name":"john","code":"98765"}]
  </code></pre>
  
  <p>how can i do this ?</p>