Filters working on notifications

This commit is contained in:
rzuasti
2026-03-04 16:22:00 -05:00
parent 63ac1d04d5
commit b8db6db83b
5 changed files with 161 additions and 70 deletions
+6 -2
View File
@@ -66,13 +66,17 @@ class BackendAPI {
late String _apiKey;
late Dio _dio;
Future<List<Notification>> listNotifications(int offset) async {
Future<List<Notification>> listNotifications(bool? isNew, int offset) async {
print('About to call /notifications');
Response response;
response = await _dio.get(
'/notifications',
queryParameters: {'page_offset': offset, 'page_limit': _pageSize},
queryParameters: {
'is_new': isNew ?? '',
'page_offset': offset,
'page_limit': _pageSize,
},
);
print('Received: ' + response.data.toString());