Replace infinite-scroll notifications with button-based pagination

- Swap PagingController/PagedSliverList for explicit page state and
  Previous/Next icon buttons below the list
- Fetch pageSize+1 items to detect the last page without a total-count
  API; pagination controls are hidden when there is only one page
- Remove unused infinite_scroll_pagination dependency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-05-29 07:56:03 -04:00
co-authored by Claude Sonnet 4.6
parent 2077f970f9
commit 85b86026cb
5 changed files with 124 additions and 98 deletions
+6 -2
View File
@@ -172,7 +172,11 @@ class BackendAPI {
return ArpScannerStatus.fromJson(response.data as Map<String, dynamic>);
}
Future<List<Notification>> listNotifications(bool? isNew, int offset) async {
Future<List<Notification>> listNotifications(
bool? isNew,
int offset, {
int? limit,
}) async {
debugPrint('About to call /notifications');
Response response;
@@ -181,7 +185,7 @@ class BackendAPI {
queryParameters: {
'is_new': isNew ?? '',
'page_offset': offset,
'page_limit': _pageSize,
'page_limit': limit ?? _pageSize,
},
);