getStringList method
Reads a set of string values from persistent storage, throwing an exception if it's not a string list.
Implementation
List<String>? getStringList(String key) {
List<dynamic>? list = _preferenceCache[key] as List<dynamic>?;
list = list?.cast<String>();
// Make a copy of the list so that later mutations won't propagate
return list?.toList() as List<String>?;
}