I'v ben struggled with this simple/multiple query from firebase & dart.
I need filter this entities 'meals' by creatorId and by %text%
.orderByChild('title')
.orderByChild('creatorId')
I apreciate any help!
await DBRef.reference()
.child('meals')
.orderByChild('title')
.startAt(text)
.orderByChild('creatorId')
.equalTo(userId)
.once()
.then((DataSnapshot snapshotResult) {
snapshot = snapshotResult;
if (snapshot == null || snapshot.value==null ) return;
map = snapshot.value;
print(map.values.toList().toString());
// print( 'map ' + map.toString());
});
I'm getting this error when put this two orderByChild
'!_parameters.containsKey('orderBy')': is not true.
So, how I suppose to filter with two params?