Order gym sets by created
This commit is contained in:
parent
da59790796
commit
305ecd20eb
|
@ -37,6 +37,9 @@ class _SetList extends State<SetList> {
|
||||||
Future<void> fetch(int pageKey) async {
|
Future<void> fetch(int pageKey) async {
|
||||||
final gymSets = await (db.select(db.gymSets)
|
final gymSets = await (db.select(db.gymSets)
|
||||||
..where((gymSet) => gymSet.name.contains(widget.search))
|
..where((gymSet) => gymSet.name.contains(widget.search))
|
||||||
|
..orderBy([
|
||||||
|
(u) => OrderingTerm(expression: u.created, mode: OrderingMode.desc),
|
||||||
|
])
|
||||||
..limit(10, offset: pageKey * 10))
|
..limit(10, offset: pageKey * 10))
|
||||||
.get();
|
.get();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user