setStringList method

void setStringList(
  1. String key,
  2. List<String> stringList, {
  3. bool removeIfEmpty = true,
})

Implementation

void setStringList(String key, List<String> stringList, {bool removeIfEmpty = true})
{
    if (stringList.length == 0 && removeIfEmpty)
        _sharedPreferences.remove(key);
    else
        _sharedPreferences.setStringList(key, stringList);
}