success method

void success(
  1. T newValue
)

Set success state with the new data.

Implementation

void success(T newValue) {
  _status = AsyncStatus.success;
  _error = null;
  value = newValue; // Automatically notifies
}