Refactor tenders pagination and enhance API integration
- Updated TendersRepository and TendersService to support cursor-based pagination. - Modified TendersViewModel to manage pagination state and handle API responses more effectively. - Replaced existing pagination UI components with a new WindowedPagination widget across desktop, mobile, and tablet views. - Improved notification handling in the UI to reflect the presence of notifications dynamically. - Adjusted main tenders slider to ensure proper rendering based on the current page index.
This commit is contained in:
@@ -16,7 +16,8 @@ class TendersService {
|
||||
|
||||
Future<Result<TendersResponse>> getTenders({
|
||||
required int limit,
|
||||
required int offset,
|
||||
int? offset,
|
||||
String? cursor,
|
||||
String? query,
|
||||
String? sortBy,
|
||||
String? sortOrder,
|
||||
@@ -27,6 +28,7 @@ class TendersService {
|
||||
TendersApi.getTenders(
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
cursor: cursor,
|
||||
query: query,
|
||||
sortBy: sortBy,
|
||||
sortOrder: sortOrder,
|
||||
@@ -37,7 +39,6 @@ class TendersService {
|
||||
method: 'GET',
|
||||
(json) => TendersResponse.fromJson(json),
|
||||
);
|
||||
print(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user