diff --git a/packages/stream_chat_flutter/lib/src/user_list_view.dart b/packages/stream_chat_flutter/lib/src/user_list_view.dart index 4d650192..12dbb3ec 100644 --- a/packages/stream_chat_flutter/lib/src/user_list_view.dart +++ b/packages/stream_chat_flutter/lib/src/user_list_view.dart @@ -48,7 +48,7 @@ class UserListView extends StatefulWidget { /// Instantiate a new UserListView const UserListView({ Key? key, - this.filter, + this.filter = const Filter.empty(), this.sort, this.presence, this.pagination = const PaginationParams(limit: 30), @@ -76,6 +76,7 @@ class UserListView extends StatefulWidget { /// The query filters to use. /// You can query on any of the custom fields you've defined on the [Channel]. /// You can also filter other built-in channel fields. + // TODO: Make it non-nullable in a future breaking release final Filter? filter; /// The sorting used for the channels matching the filters. diff --git a/packages/stream_chat_flutter_core/lib/src/user_list_core.dart b/packages/stream_chat_flutter_core/lib/src/user_list_core.dart index 06ad7d80..75fc7411 100644 --- a/packages/stream_chat_flutter_core/lib/src/user_list_core.dart +++ b/packages/stream_chat_flutter_core/lib/src/user_list_core.dart @@ -63,7 +63,7 @@ class UserListCore extends StatefulWidget { required this.loadingBuilder, required this.listBuilder, Key? key, - this.filter, + this.filter = const Filter.empty(), this.sort, this.presence, this.pagination = const PaginationParams(limit: 30), @@ -91,6 +91,7 @@ class UserListCore extends StatefulWidget { /// The query filters to use. /// You can query on any of the custom fields you've defined on the [Channel]. /// You can also filter other built-in channel fields. + // TODO: Make it non-nullable in a future breaking release final Filter? filter; /// The sorting used for the channels matching the filters.