getStringList static method

List<String> getStringList(
  1. String key, {
  2. List<String> defValue = const [],
})

get string list. 获取sp中key的list

Implementation

static List<String> getStringList(String key,
    {List<String> defValue = const []}) {
  if (_prefs == null) {
    return defValue;
  }
  return _prefs?.getStringList(key) ?? defValue;
}