cartCheck method

Future<List<CartProduct>?> cartCheck(
  1. List<Map<String, dynamic>> cart
)

Implementation

Future<List<CartProduct>?> cartCheck(List<Map<String, dynamic>> cart) async {
  try {
    Response response =
        await this.client.post("/cart-check", data: {"cart": cart});
    return (response.data as List)
        .map((e) => CartProduct.fromJson(e))
        .toList();
  } on Exception catch (e) {
    logResponse(e.toString());
  }
  return null;
}