|
|
|
@@ -120,20 +120,23 @@ class Repository { |
|
|
|
{@required LocationType locationType, |
|
|
|
int filterId, |
|
|
|
int page = 0, |
|
|
|
int size = 100}) { |
|
|
|
int size = 500}) { |
|
|
|
final client = RestClient(dio); |
|
|
|
var op = buildConfigurableCacheOptions( |
|
|
|
forceRefresh: true, maxAge: Duration(days: ConstCommon.kMaxAgeCache)); |
|
|
|
var response; |
|
|
|
switch (locationType) { |
|
|
|
case LocationType.province: |
|
|
|
response = client.getProvinces(filterId, options: op); |
|
|
|
response = |
|
|
|
client.getProvinces(filterId, options: op, page: page, size: size); |
|
|
|
break; |
|
|
|
case LocationType.district: |
|
|
|
response = client.getDistricts(filterId, options: op); |
|
|
|
response = |
|
|
|
client.getDistricts(filterId, options: op, page: page, size: size); |
|
|
|
break; |
|
|
|
case LocationType.ward: |
|
|
|
response = client.getWards(filterId, options: op); |
|
|
|
response = |
|
|
|
client.getWards(filterId, options: op, page: page, size: size); |
|
|
|
break; |
|
|
|
default: |
|
|
|
response = client.getCountries(); |