getDoubleF static method
Returns a Future. Returns 0 if key is null.
Implementation
static Future<double> getDoubleF(String? key, [double? defValue]) async {
double value;
if (key == null) {
return 0;
}
if (_prefsInstance == null) {
final prefs = await instance;
value = prefs.getDouble(key) ?? defValue ?? 0.0;
} else {
// SharedPreferences is available. Ignore init() function.
_initCalled = true;
value = getDouble(key, defValue);
}
return value;
}