ShopifyCart class
ShopifyCart provides various method in order to work with carts.
- Mixed-in types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addLineItemsToCart(
{required String cartId, required List< CartLineUpdateInput> cartLineInputs}) → Future<Cart> - add line item to cart
-
checkForError(
QueryResult< Object?> queryResult, {String? key, String? errorKey}) → void -
throws a
OperationException
if the operation was wrong throws a ShopifyException if shopify reports an errorinherited -
createCart(
CartInput cartInput) → Future< Cart> - create cart
-
getCartById(
String cartId) → Future< Cart> - Returns a Cart object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeLineItemsFromCart(
{required String cartId, required List< String> lineIds}) → Future<Cart> - remove line item from cart
-
toString(
) → String -
A string representation of this object.
inherited
-
updateBuyerIdentityInCart(
{required String cartId, required CartBuyerIdentityInput buyerIdentity}) → Future< Cart> - update Buyer identity in cart
-
updateCartDiscountCodes(
{required String cartId, required List< String> discountCodes}) → Future<Cart> - update cart discount codes
-
updateLineItemsInCart(
{required String cartId, required List< CartLineUpdateInput> cartLineInputs}) → Future<Cart> - update line items in cart
-
updateNoteInCart(
{required String cartId, required String note}) → Future< Cart> - update note in cart
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → ShopifyCart
-
Singleton instance of ShopifyCart
final