PrfDouble constructor

PrfDouble(
  1. String key, {
  2. double? defaultValue,
})

Creates a new double preference variable with the specified key.

The optional defaultValue is returned if the preference is not found or if an error occurs while reading.

Implementation

PrfDouble(String key, {double? defaultValue})
    : super(
        key,
        (prefs, key) async => await prefs.getDouble(key),
        (prefs, key, value) async => await prefs.setDouble(key, value),
        defaultValue,
      );