Future<List<ABC>> getReadings() {
return (select(readings)
..orderBy([(t) => OrderingMode.desc(expression:t.updatedAt)]))
.get();
}
Error
The expression doesn't evaluate to a function, so it can't be invoked.
At the moment, the correct way to do this would be
[(t) => OrderingTerm(expression: t.updatedAt, mode: OrderingMode.desc)]
I like the idea of having OrderingTerm.desc and OrderingTerm.asc factories though, they could make this feature easier to use.
Kinda weird. I want to display number based on OrderingMode.asc, but I get this:
1,10,11,2,3,4,5,6,7,8,9
Sounds like that number is actually a string. If you post your query and table declaration I can take a look on how to fix that.
I changed String to int, it works now . Thanks.
Most helpful comment
At the moment, the correct way to do this would be
I like the idea of having
OrderingTerm.descandOrderingTerm.ascfactories though, they could make this feature easier to use.