algolia / algolia/algoliasearch-helper-flutter
FilterState.filters stream not updated on FilterState.clear
- Dominant language
- Dart
- Stars
- 27
- Forks
- 21
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
**Describe the bug 🐛**
I have a `FilterState` and listen to the `filterState.filters` stream for updates. When adding filters i receive updates, but not when calling `filterState.clear`.
**To Reproduce 🔍**
1. create a `FilterState` instance
2. listen to the `FilterState.filters` stream using a `StreamBuilder`
3. add filters and confirm we receive stream updates
4. add a button which calls `filterState.clear` and confirm the `StreamBuilder` does not receive an update
**Expected behavior 💭**
I'd expect `StreamBuilder` to receive an update when calling `filterState.clear`
**Screenshots 🖥**
**Environment:**
- OS: iOS
- Library Version ^0.2.3
**Additional context**
flutter --version
```
Flutter 3.7.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 12cb4eb7a0 (8 days ago) • 2023-03-01 10:29:26 -0800
Engine • revision ada363ee93
Tools • Dart 2.19.3 • DevTools 2.20.1
```
Contributor guide
Research direction
Start by locating FilterState.clear and the FilterState.filters stream, then trace how adding filters emits updates. Confirm completion when calling clear causes StreamBuilder listeners to receive an update; the report provides no file or test path, so inspect the relevant implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile, search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100