Skip to content

Instantly share code, notes, and snippets.

@pawelsa
Last active June 26, 2022 17:57
Show Gist options
  • Save pawelsa/666288311546d28fc7a481562d6ad951 to your computer and use it in GitHub Desktop.
Save pawelsa/666288311546d28fc7a481562d6ad951 to your computer and use it in GitHub Desktop.
Methods to observe the database and map models to view data
Stream<List<ContentDetailData>> observeDetailedUpcoming() =>
_movieDao.observeAllUpcoming().asyncMap(getDetailsFromDb);
Stream<List<ContentDetailData>> observeDetailedPopular() =>
_movieDao.observeAllPopular().asyncMap(getDetailsFromDb);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment