setStringList method

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

Implementation

Future<bool> setStringList(String key, List<String> stringList, {bool removeIfEmpty = true})
{
    if (stringList.isEmpty && removeIfEmpty)
        return _sharedPreferences.remove(key);

    return _sharedPreferences.setStringList(key, stringList);
}