title: delete one element in a list in sharedPreferences
body: <p>I'm trying to delete an element in my <code>favoriteList</code> here but this doesn't seem to be working. I've looked on the web but couldn't find anything related to this. They were all about how to clear sharedPreferences or delete a key.</p>
  <pre class="lang-dart prettyprint-override"><code> Future&lt;void&gt; removeFav(String articleId) async {
      SharedPreferences prefs = await SharedPreferences.getInstance();
      favoriteList = prefs.getStringList('favoriteList');
      if (favoriteList != null) {
        await prefs.remove('${favoriteList!.where((id) =&gt; id == articleId)}'); //I'm guessing id here returns an element of this list..??
        print('unfavorited');
        setState(() {
          isFavorite = false;
        });
      } else {
        print('favoriteList was null');
      }
    }
  </code></pre>