Home > Mobile >  Firebase filtering and add to list the results
Firebase filtering and add to list the results

Time:12-09

i just want to filter the queries when conditions true query " norequest >= 5 " it should get the those query or doc's " coordinates " and add the results to a list. How can i do that? enter image description here

enter image description here

enter image description here

CodePudding user response:

  1. You need to declare norequest field to Integer.

  2. Than you got a List<Map<String, dynamic>> where you can set many filter

Code example:

QuerySnapshot query = await firestore
    .collection('stations')
    .where('norequest', isGreaterThanOrEqualTo: 5)
    .get();
  • Related