# Matchmaking Does Not Work when I Define A Query Parameter (Flutter Code)

**URL:** https://forum.heroiclabs.com/t/matchmaking-does-not-work-when-i-define-a-query-parameter-flutter-code/6165
**Category:** Client Libraries
**Tags:** server-framework
**Created:** [April 21, 2025, 9:22am UTC](https://forum.heroiclabs.com/t/matchmaking-does-not-work-when-i-define-a-query-parameter-flutter-code/6165 "2025-04-21T09:22:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sakhile\_Mamba](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@Sakhile\_Mamba](https://forum.heroiclabs.com/u/Sakhile_Mamba)
#### Post date: [April 21, 2025, 9:22am UTC](https://forum.heroiclabs.com/t/matchmaking-does-not-work-when-i-define-a-query-parameter-flutter-code/6165/1 "2025-04-21T09:22:04Z")

</div>

Please note that the Flutter code below does not match players:

```auto
final ticket = await socket.addMatchmaker(
        minCount: 2,
        maxCount: 2,
        query: "+betAmount:$betAmount", // Filter by bet amount
        stringProperties: {
          'game': 'crazy_eights',
          'betAmount': betAmount.toString(),
        },
      );

```

However, if I remove the line where the query parameter is defined, it works. Please help, I am trying to match players according to their bet sizes.

How can I match players using the query? Please see my reference linked here: [Query Syntax - Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/concepts/multiplayer/query-syntax/)

---

<div class="post-metadata">

### Author: ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)
#### Post date: [April 30, 2025, 9:55am UTC](https://forum.heroiclabs.com/t/matchmaking-does-not-work-when-i-define-a-query-parameter-flutter-code/6165/2 "2025-04-30T09:55:54Z")

</div>

@Sakhile_Mamba to match properties you need to prefix the key with `properties.`, have a look at the examples in: [Matchmaker - Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/concepts/multiplayer/matchmaker/#query).

Best.

---

<div class="post-metadata">

### Author: ![Sakhile\_Mamba](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@Sakhile\_Mamba](https://forum.heroiclabs.com/u/Sakhile_Mamba)
#### Post date: [May 3, 2025, 7:04pm UTC](https://forum.heroiclabs.com/t/matchmaking-does-not-work-when-i-define-a-query-parameter-flutter-code/6165/3 "2025-05-03T19:04:51Z")

</div>

Thank you for the help. I have figured this out.
