feat: search product and fix product

This commit is contained in:
efrilm
2025-08-07 12:19:25 +07:00
parent 5575596bfc
commit fe92082ceb
9 changed files with 349 additions and 118 deletions
@@ -17,6 +17,7 @@ class ProductRemoteDatasource {
int page = 1,
int limit = Variables.defaultLimit,
String? categoryId,
String? search,
}) async {
try {
final authData = await AuthLocalDataSource().getAuthData();
@@ -31,6 +32,10 @@ class ProductRemoteDatasource {
queryParameters['category_id'] = categoryId;
}
if (search != null && search.isNotEmpty) {
queryParameters['search'] = search;
}
final response = await dio.get(
url,
queryParameters: queryParameters,