simpleQueryData method
Future<List>
simpleQueryData(
- String collectionId, {
- required String name,
- required String value,
- required String orderBy,
- bool descending = true,
- int? limit,
- int? offset,
override
Implementation
@override
Future<List> simpleQueryData(String collectionId,
{required String name,
required String value,
required String orderBy,
bool descending = true,
int? limit,
int? offset}) async {
await initialize();
List resultList = [];
CollectionReference collectionRef = _db!.collection(collectionId);
await collectionRef
.orderBy(orderBy, descending: true)
.where(name, isEqualTo: value)
.get()
.then((snapshot) {
resultList = snapshot.docs.map((doc) {
//logger.finest(doc.data()!.toString());
return doc.data()! as Map<String, dynamic>;
}).toList();
});
return resultList;
}