How to make a filter with != or Isnotiqualto in the Firestore?

Asked

Viewed 65 times

0

Hello!

I need to make an appointment with filter on firestore but I read in the documentation that they do not have "!=" or "Isnotiqualto" to create a restriction. I wanted to do something like:

Search for books that are not registered with the user’s email.

var snapshots = Firestore.instance
    .collection('livros')
    .where('email', isNotEqualTo: _email )
    .snapshots();

Does anyone have any suggestions?

  • 1

    is not possible according to documentation, it follows: https://firebase.google.com/docs/firestore/query-data/queries?hl=pt-br#query_limitations

2 answers

0

-1

Just use:

var snapshots = Firestore.instance
.collection('livros')
.where('email', '!=', _email )
.snapshots();
  • It would be good to explain the differences of your code to what was asked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.