getIntList method
Implementation
List<int> getIntList(String key, List<int> def)
{
try
{
if (_sharedPreferences.containsKey(key) == false)
return def;
List<String>? stringList = _sharedPreferences.getStringList(key);
if (stringList == null)
return def;
var intList = List<int>.empty();
for (String s in stringList)
intList.add(int.parse(s));
return intList;
}
catch (e)
{
logInfo(e.toString());
logInfo('${_sharedPreferences.get(key)}');
return def;
}
}