setDouble static method

Future<void> setDouble(
  1. String key,
  2. double value
)

存储双精度类型到 SharedPreferences

示例:

await SharepUtil.setDouble('salary', 8888.8);

Implementation

static Future<void> setDouble(String key, double value) async {
  final prefs = _prefs ?? await init();
  await prefs.setDouble(key, value);
}