fix(llc): Fix Filter.empty encoding
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -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', () {
|
||||
|
||||
Reference in New Issue
Block a user