Flutter SDK and indexed queryable fields syncronication issues

Hi,

I’m trying to setup a flutter based app, with app sync.

However I’m facing a few issues.

I have a model with an Indexed Queryable Field - however when I setup the subscriptions

if(realm.subscriptions.isEmpty) {
    try {
        realm.subscriptions.update((mutableSubscriptions) {
          mutableSubscriptions.add(
              realm.query<Attachment>(r"_partition == $0", [1]));
          //mutableSubscriptions.add(realm.all<Video>());
        });
      } catch (error) {
        print("error ${error.toString()}");
      }
  }
  
  await realm.subscriptions.waitForSynchronization();

It fails with [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value

The session is terminated on the app service side, with the following error:

ending session with error: query must contain an equality comparison (== or IN) against the indexed queryable field that is AND'ed with the remainder of the query (ProtocolErrorCode=226)

I have tried a few different things, and gone through the documents for creating queries with indexed queryable properties. But cant seem to get it to work.

What am I doing wrong ?