getDouble function

  1. @Deprecated('Use getDoubleAsync instead without using await')
Future<double> getDouble(
  1. String key, {
  2. dynamic defaultValue = 0.0,
})

Returns a Double if exists in SharedPref

Implementation

@Deprecated('Use getDoubleAsync instead without using await')
Future<double> getDouble(String key, {defaultValue = 0.0}) async {
  return await getSharedPref().then((pref) {
    return pref.getDouble(key) ?? defaultValue;
  });
}