getCartSummary method Null safety
- {required int customerId}
override
Get all the information about cart for checkout
Implementation
@override
Future<CartSummaryModel> getCartSummary({required int customerId}) async {
final response = await getData(
path: 'profile/cart/summary',
queryParameters: {"CustomerID": customerId});
final result = ApiReturnResult.fromJSON(response.data);
if (result.code == 200) {
return CartSummaryModel.fromJson(result.data);
} else {
throw ExceptionApi(code: result.code, message: result.error?.first);
}
}