algolia / algolia/algoliasearch-helper-flutter

FilterState.filters stream not updated on FilterState.clear

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.