Open
Description
flutter_bloc_tutorial/lib/bloc.dart
Lines 20 to 24 in 7c1cea3
I didn't try to run the code but I think there's a bug here when two queries are made in quick succession.
Consider the following time line:
- query for "dog"
- call
api.get("dog")
- query for "cat"
- call
api.get("cat")
- receive API response for "dog"
- log "Results for cat" (because "cat" is the latest value in
_query
stream) - receive API response for "cat"
- log "Results for cat"
That is, it logs "Results for cat" twice and never logs "Results for dog" because _query
and _results
streams are not synced/zipped.
Metadata
Metadata
Assignees
Labels
No labels