Remove try catch from set_list pagination
All this does is obscure errors. I want it to break when things go wrong and show me why in the logs.
This commit is contained in:
@@ -35,7 +35,6 @@ class _SetList extends State<SetList> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> fetch(int pageKey) async {
|
Future<void> fetch(int pageKey) async {
|
||||||
try {
|
|
||||||
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))
|
||||||
..limit(10, offset: pageKey * 10))
|
..limit(10, offset: pageKey * 10))
|
||||||
@@ -49,9 +48,6 @@ class _SetList extends State<SetList> {
|
|||||||
final nextPageKey = pageKey + 1;
|
final nextPageKey = pageKey + 1;
|
||||||
pagingController.appendPage(gymSets, nextPageKey);
|
pagingController.appendPage(gymSets, nextPageKey);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
|
||||||
pagingController.error = error;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleSearch() {
|
void toggleSearch() {
|
||||||
|
|||||||
Reference in New Issue
Block a user