getDouble static method
获取double类型数据,如果没有则返回默认值
key 键
defValue 默认值:默认为0.0
Implementation
static Future<double> getDouble(String key, [double defValue = 0.0]) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
double? value = prefs.getDouble(key) ?? defValue;
_println('getDouble', key, value);
return value;
}