fix: wrong card for vendor country (#1905)

* fix: wrong card for vendor country

* Update lib/cake_pay/cake_pay_vendor.dart

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
rafael xɱr 2024-12-27 00:01:41 -03:00 committed by GitHub
parent 542920a512
commit b1c9be637f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 12 deletions

View file

@ -204,8 +204,8 @@ class CakePayApi {
/// Get Vendors
Future<List<CakePayVendor>> getVendors({
required String apiKey,
required String country,
int? page,
String? country,
String? countryCode,
String? search,
List<String>? vendorIds,
@ -247,7 +247,7 @@ class CakePayApi {
}
return (bodyJson['results'] as List)
.map((e) => CakePayVendor.fromJson(e as Map<String, dynamic>))
.map((e) => CakePayVendor.fromJson(e as Map<String, dynamic>, country))
.toList();
}
}