diff --git a/packages/stream_chat/lib/src/models/filter.dart b/packages/stream_chat/lib/src/models/filter.dart
index 2356c57b..eb3932ff 100644
--- a/packages/stream_chat/lib/src/models/filter.dart
+++ b/packages/stream_chat/lib/src/models/filter.dart
@@ -87,8 +87,8 @@ extension FilterOperatorX on FilterOperator {
/// See Query Channels Documentation
class Filter extends Equatable {
const Filter.__({
- required this.operator,
required this.value,
+ this.operator,
this.key,
});
@@ -159,13 +159,26 @@ class Filter extends Equatable {
/// Creates a custom [Filter] if there isn't one already available.
const factory Filter.custom({
- required String operator,
required Object value,
+ String? operator,
String? key,
}) = Filter.__;
+ /// Creates a custom [Filter] from a raw map value
+ ///
+ /// ```dart
+ /// final filter = Filter.raw(
+ /// {
+ /// 'members': [user1.id, user2.id],
+ /// }
+ /// )
+ /// ```
+ const factory Filter.raw({
+ required Map value,
+ }) = Filter.__;
+
/// An operator used for the filter. The operator string must start with `$`
- final String operator;
+ final String? operator;
/// The "left-hand" side of the filter.
/// Specifies the name of the field the filter should match.
@@ -183,24 +196,22 @@ class Filter extends Equatable {
List