Written tutorial here: 👇👇
https://codewithandrea.com/videos/202...
RxDart is a very useful package for working with observables and streams of data that change over time.
This tutorial shows how to use the combineLatest operator to combine data from two collections in the Firestore database.
A movie favourites app is used as an example, evaluating two different solutions that satisfy the same requirements.
Prerequisites:
familiarity with streams, StreamBuilder, Firestore collections and documents
HIGHLIGHTS
00:00 - Intro
01:51 - Simple movies app reading data from a simple collection
02:55 - Adding user favourites to the Firestore schema
03:51 - Wiring things up and writing data from the UI
05:27 - Reading data with nested StreamBuilders
06:36 - Combining data with combineLatest: intro
08:12 - Combining data with combineLatest: in practice
10:50 - Updated UI using the new logic
12:09 - Comparing combineLatest with the nested StreamBuilders approach
13:13 - Interactive RxMarbles diagrams
14:03 - Alternative approaches for combining streams
15:02 - Other use cases for combineLatest
Full source code: https://github.com/bizz84/rxdart_comb...
RxMarbles website: https://rxmarbles.com/
Want more? Check out all my Flutter courses: 👇👇
https://codewithandrea.com/courses/
Happy coding!