ViewModel constructor
ViewModel({
- String? errorMessage,
- ViewStatus status = ViewStatus.loading,
- Iterable<
IObservable< ? changes,BaseEvent> >
Implementation
ViewModel(
{String? errorMessage,
ViewStatus status = ViewStatus.loading,
Iterable<IObservable<BaseEvent>>? changes}) {
lastEvent = ViewChangedEvent(
status: status,
errorMessage: errorMessage,
changes: changes ?? [],
);
eventSubject.stream.doOnData((event) => hasChanges = true);
}