addToCart abstract method

  1. @POST(Api.addToCart)
Future<CartModel> addToCart({
  1. @Body() required AddToCartRequest body,
  2. @Header("X-User-Id") String xUserId = "",
  3. @Header("Content-Type") String type = "application/json",
  4. @Header("X-Roles") String xRoles = "",
})

Implementation

@POST(Api.addToCart)
Future<CartModel> addToCart(
    {@Body() required AddToCartRequest body,
    @Header("X-User-Id") String xUserId = "",
    @Header("Content-Type") String type = "application/json",
    @Header("X-Roles") String xRoles = ""});