addToCart method

Future<bool> addToCart(
  1. String sku,
  2. int quantity, [
  3. Map<String, dynamic>? productOption
])

Add item to cart.

Adds a product to the shopping cart with the specified quantity.

sku the product's SKU to add quantity the quantity to add productOption optional product options (size, color, etc.)

Returns true if item was added successfully, false otherwise.

Implementation

Future<bool> addToCart(
  String sku,
  int quantity, [
  Map<String, dynamic>? productOption,
]) {
  throw UnimplementedError('addToCart() has not been implemented.');
}