customerSummary method Null safety
- {required int customerId}
override
Use it to get user's profile points and wishlist number
Implementation
@override
Future<CustomerSummaryModel> customerSummary(
{required int customerId}) async {
final response = await postData(
path: 'profile/customerSummary',
queryParameters: {"CustomerID": customerId},
);
final result = ApiReturnResult.fromJSON(response.data);
if (result.code == 200) {
return CustomerSummaryModel.fromJson(result.data);
} else {
throw ExceptionApi(code: result.code, message: result.error?.first);
}
}