PrfInt constructor
Creates a new integer 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
PrfInt(String key, {int? defaultValue})
: super(
key,
(prefs, key) async => await prefs.getInt(key),
(prefs, key, value) async => await prefs.setInt(key, value),
defaultValue,
);