add type safe filters in queryUsers and queryMembers
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -1243,11 +1243,10 @@ class MessageInputState extends State<MessageInput> {
|
||||
Future<List<Member>> queryMembers;
|
||||
|
||||
if (query.isNotEmpty) {
|
||||
queryMembers = StreamChannel.of(context).channel.queryMembers(filter: {
|
||||
'name': {
|
||||
'\$autocomplete': query,
|
||||
},
|
||||
}).then((res) => res.members);
|
||||
queryMembers = StreamChannel.of(context)
|
||||
.channel
|
||||
.queryMembers(filter: Filter.autoComplete('name', query))
|
||||
.then((res) => res.members);
|
||||
}
|
||||
|
||||
final members = StreamChannel.of(context).channel.state.members?.where((m) {
|
||||
|
||||
@@ -72,7 +72,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.
|
||||
final Map<String, dynamic> filter;
|
||||
final Filter filter;
|
||||
|
||||
/// Query channels options.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user