title: Flutter : how save list of dynamic to shared preference
body: <p>I am trying to save a list of data to shared preference and read these articles but don't works with me :</p>
  <p><a href="https://stackoverflow.com/questions/59246541/flutter-save-list-with-shared-preferences">Flutter save List with shared preferences</a></p>
  <p><a href="https://stackoverflow.com/questions/55545326/shared-preferences-in-flutter-cannot-save-and-read-list">Shared Preferences in Flutter cannot save and read List</a></p>
  <p>I have this list :</p>
  <pre><code>var list =[
         {
            &quot;id&quot; : 1,
            &quot;name&quot; : &quot;ali&quot;
          },
          {
            &quot;id&quot; : 2,
            &quot;name&quot; : &quot;jhon&quot;
          }
        ];
  </code></pre>
  <p>I tried this :</p>
  <pre><code>setList() async {
      Future&lt;SharedPreferences&gt; _prefs = SharedPreferences.getInstance();
      final SharedPreferences prefs = await _prefs;
      prefs.setStringList('list', list);
    }
  </code></pre>
  <p>I get this error : <code>The argument type 'List&lt;Map&lt;String, Object&gt;&gt;' can't be assigned to the parameter type 'List&lt;String&gt;'</code></p>