readDouble static method

Future<double> readDouble(
  1. String key, [
  2. double defaultValue = 0.0
])

Implementation

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