mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
format code
This commit is contained in:
@@ -56,7 +56,8 @@ class SpUtil {
|
||||
}
|
||||
|
||||
/// get obj list.
|
||||
static List<T>? getObjList<T>(String key, T f(Map v), {List<T> defValue = const []}) {
|
||||
static List<T>? getObjList<T>(String key, T f(Map v),
|
||||
{List<T> defValue = const []}) {
|
||||
List<Map>? dataList = getObjectList(key);
|
||||
List<T>? list = dataList?.map((value) {
|
||||
return f(value);
|
||||
@@ -123,7 +124,8 @@ class SpUtil {
|
||||
}
|
||||
|
||||
/// get string list.
|
||||
static List<String> getStringList(String key, {List<String> defValue = const []}) {
|
||||
static List<String> getStringList(String key,
|
||||
{List<String> defValue = const []}) {
|
||||
if (_prefs == null) return defValue;
|
||||
return _prefs!.getStringList(key) ?? defValue;
|
||||
}
|
||||
@@ -168,4 +170,4 @@ class SpUtil {
|
||||
static bool isInitialized() {
|
||||
return _prefs != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user