getValue method
Retrieves the value for the given key, falling back to defaultValue on error.
Implementation
Future<T> getValue(String k) async {
try {
final value = await onGetValue(k);
_currentValue = value;
if (!_controller.isClosed) {
_controller.add(value);
}
return value;
} catch (_) {
return defaultValue;
}
}