获取保存的浮点型
Future<double?> getDouble(String key) async { // obtain shared preferences final prefs = await SharedPreferences.getInstance(); var value = prefs.getDouble(key); return Future.value(value); }