ViewModel<State, Event> constructor

ViewModel<State, Event>(
  1. Result<State, Exception> state
)

Implementation

ViewModel(Result<State, Exception> state) {
  if (state is Ok) {
    _state.add(state);
  } else {
    _state.addError(state);
  }
}