getListCustom<T> static method
获取自定义的List类型的数据 第二参数Fn自定义转换结果,并返回类型
Implementation
static Future<List<T>> getListCustom<T>(String key, T Function(T v) f,
{List<T>? defValue}) async {
if (_prefs == null) await getInstance();
List<T> list = await getList<T>(key, defValue: defValue);
list = list.map((value) => f(value)).toList();
return list;
}