fix(llc): Fix Filter.empty encoding

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-09-15 17:45:32 +05:30
committed by xsahil03x
parent 1d142d7697
commit abc22f0eb9
3 changed files with 8 additions and 1 deletions
+1
View File
@@ -19,6 +19,7 @@
🐞 Fixed
- [[#659]](https://github.com/GetStream/stream-chat-flutter/issues/659) Fixed unread count not updating correctly.
- Fix `Filter.empty()` json encoding.
## 2.2.1
@@ -104,7 +104,7 @@ class Filter extends Equatable {
/// An empty filter
const Filter.empty()
: value = const {},
: value = const <String, Object?>{},
operator = null,
key = null;
@@ -226,6 +226,12 @@ void main() {
json.encode(value),
);
});
test('empty', () {
const filter = Filter.empty();
final encoded = json.encode(filter);
expect(encoded, '{}');
});
});
test('groupedFilter', () {