getDouble static method

double getDouble(
  1. String key, {
  2. double? def,
})

Implementation

static double getDouble(String key, {double? def}) {
  double val = 0.0;
  if (_memoryPrefs.containsKey(key)) {
    val = _memoryPrefs[key];
  }
  if (val == null) {
    val = _prefs!.getDouble(key)!;
  }
  if (val == null) {
    val = def!;
  }
  _memoryPrefs[key] = val;
  return val;
}