Last active
July 6, 2022 19:19
-
-
Save pawelsa/1e589e647c300c275fd7cde661a0dbfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final LoadingStatus _upcomingMoviesLoadingStatus = LoadingStatus(); | |
DataStream<List<ContentDetailData>> observeDetailedUpcoming() => | |
_movieDao.observeAllUpcoming().asyncMap(getDetailsFromDb).combineLatest<bool, | |
StreamData<List<ContentDetailData>>>(_upcomingMoviesLoadingStatus.listen(), | |
(data, isLoading) { | |
if (isLoading) { | |
return LoadingData(data); | |
} | |
return ReadyData(data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment