saveDouble static method

Future<bool> saveDouble(
  1. String key,
  2. double? value, [
  3. double defaultValue = 0.0
])

Implementation

static Future<bool> saveDouble(String key, double? value,
    [double defaultValue = 0.0]) async {
  final prefs = await SharedPreferences.getInstance();
  return prefs.setDouble(key, value ?? defaultValue);
}