Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StreamSubscription<QuerySnapshot<Map<String, dynamic>>> fails to capture data if the query is filtered using .where(field, arrayContains: Map<String, String>) #279

Open
tannerhenry1 opened this issue Nov 1, 2023 · 0 comments

Comments

@tannerhenry1
Copy link

Below is the minimum reproducible code for this issue:

final mockDb = FakeFirebaseFirestore();
final mockCollectionRef = mockDb.collection('someCollection');
await mockCollectionRef.add({
        'users': [{'some_field': 'mockFieldValue', 'some_other_field': 'mockFieldValue2'}],
 });
mockCollectionRef
          .where(
            'users',
            arrayContains: {
              'some_field': 'mockFieldValue',
              'some_other_field': 'mockFieldValue2'
            },
          )
          .snapshots()
          .listen((event) {
            log.i('Listener found: ${event.docs.length}');
          });

The console indicates that there are no documents associated with this listener request, i.e. the log,i statement prints 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant