currentState property
RepositoryState<Data>
currentState
Returns the current state of the repository.
If the repository does not have any data, this method returns RepositoryState.empty. Otherwise, it returns a RepositoryState instance containing the current data.
Implementation
RepositoryState<Data> get currentState {
final state = _controller.valueOrNull;
if (state == null) {
return RepositoryState<Data>.empty();
} else {
return state;
}
}