convertResultToState method

S convertResultToState(
  1. Result result
)

Implementation

S convertResultToState(Result result) {
  state.resultStatus = _getStatusFromResult(result) ?? state.resultStatus;

  if (result.isSuccess) {
    state.item = result.data;
  }

  return state.copyWith();
}