getStringList static method

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

Implementation

static List<String>? getStringList(String key, {List<String>? defaultValue = const []}) {
  final cached = _cache[key];
  if (cached is List<String>) return cached;
  final value = prefs!.getStringList(key) ?? defaultValue;
  if (value != null) _cache[key] = value;
  return value;
}