value property

  1. @override
Result<T> value
override

The current Result stored in this notifier.

When the value is replaced with something that is not equal to the old value as evaluated by the equality operator ==, this class notifies its listeners.

Implementation

@override
Result<T> get value => _value;
void value=(Result<T> newValue)

Implementation

set value(Result<T> newValue) {
  if (_value == newValue) {
    return;
  } else if (newValue.isError && onErrorReturn != null) {
    _value = value.toData(data: onErrorReturn!(newValue.error));
  } else {
    _value = newValue;
  }
  notifyListeners();
}