shopify_flutter 3.0.1
shopify_flutter: ^3.0.1 copied to clipboard
A Flutter package to seamlessly connect your Shopify store with your app.
3.0.1 #
Added language code getter/setter in shopify_localization
3.0.0 #
Removes every deprecated Storefront API field the package still queried, migrating to the 2026-07 replacements. Because several of these change the shape of the public Dart models, this is a breaking release. This version now requires Storefront API 2026-07 or newer (it relies on Cart.lines.discountAllocations(lineLevelOnly:) and cart-level delivery, both added in 2026-07); the default storefrontApiVersion is already 2026-07.
Breaking model changes:
ShopifyImage.originalSrc→ShopifyImage.url(Image.originalSrc/srcwere deprecated in favour ofurl). Affects every image across products, collections, articles and media.Option.values(List<String>) →Option.optionValues(List<ProductOptionValue>, each withid+name). New exported modelProductOptionValue. MirrorsProductOption.values→optionValuesin the API.Order.subtotalPriceV2/totalPriceV2/totalShippingPriceV2/totalTaxV2/totalRefundedV2→subtotalPrice/totalPrice/totalShippingPrice/totalTax/totalRefunded(the*V2money fields were deprecated).CartCostlosttotalTaxAmount,totalTaxAmountEstimated,totalDutyAmount,totalDutyAmountEstimated. Shopify no longer returns tax/duty amounts on the cart ("no longer available and will be removed in a future version"), so these always returned null/false.- Cart delivery addresses moved off the buyer identity:
- Removed
CartBuyerIdentity.deliveryAddressPreferencesandCartBuyerIdentityInput.deliveryAddressPreferences(the input field was deprecated). Cartgainsdelivery(CartDelivery→List<CartSelectableAddress>, each exposingid,selected,oneTimeUse, and aCartDeliveryAddress). New exported models:CartDelivery,CartSelectableAddress,CartDeliveryAddress.CartInputgainsdelivery(CartDeliveryInput). New exported inputs:CartDeliveryInput,CartSelectableAddressInput,CartAddressInput,CartDeliveryAddressInput. These replace the removedDeliveryAddressInput(MailingAddressInputremains for other uses). Note the new delivery inputs takecountryCode/provinceCode(e.g.AU/NSW) rather than full names.- New
ShopifyCart.addDeliveryAddresses(cartId:, addresses:)(mutationcartDeliveryAddressesAdd) to add delivery addresses to an existing cart;updateBuyerIdentityInCartno longer accepts addresses.
- Removed
- Removed the
Marketmodel and its export, and themarketfield onLocalizationandCountry(Localization.market/Country.marketwere deprecated with no Storefront replacement).
Other:
- Line-level
discountAllocationsnow requestslineLevelOnly: falseso order-level allocations are included, and the deprecated cart-levelCart.discountAllocationsselection was dropped (use the per-line allocations). - Internal query fields migrated with no public-API impact:
ImageoriginalSrc→urlin all documents,ProductVariant.priceV2/compareAtPriceV2→price/compareAtPrice, andproductByHandle/blogByHandle/pageByHandle→product/blog/page. - Updated the default
storefrontApiVersionfrom 2024-07 to 2026-07. 2024-07 has been sunset since July 2025; Shopify serves requests for an unsupported version from the oldest supported version instead, so callers relying on the default were silently drifting across versions as each one sunset. Callers that already passstorefrontApiVersionexplicitly should ensure it is2026-07or newer (see the requirement above). - Fixed three GraphQL documents that were rejected by the Storefront API on every currently supported version:
getXCollectionsAndNProductsSorteddeclared$collectonMetafields(typo) but used$collectionMetafields, so the server rejected the document withVariable "$collectionMetafields" is not defined. The Dart caller was already passing the correctly spelled variable, so this method could never have succeeded.getNArticlesSortedselected the removedArticle.urlfield. Replaced withonlineStoreUrl, which is what theArticlemodel already parses.getCollectionByIdQuerypassed a list to the single-collection lookup (collection(ids: $ids)); corrected tocollection(id: $id). This query has no caller in the package.
- Fixed
CartAddressInputserialization. It is a Storefront "one of" input (exactly one field may be present), buttoJsonemitted bothcopyFromCustomerAddressIdanddeliveryAddress, so adding a cart delivery address (viaShopifyCart.addDeliveryAddressesorCartInput.delivery) failed with'CartAddressInput' requires exactly one argument, but 2 were provided. The unused (null) field is now omitted. - Example app: builds on the Java 25 / AGP 9 toolchain (Gradle 9.6.1, AGP 9.3.0, built-in Kotlin); removed the hard-coded
pricefilter on the collection tab that made collections appear empty; and fixed the Blog/Pages tabs spinning forever on a failed fetch (they now clear the spinner and show the error — e.g. a missingunauthenticated_read_contentscope — or an empty state). - Example app: the cart tab added
productVariants.firstregardless of whether that variant was purchasable. Shopify creates a line for an unavailable variant withquantity: 0and reports nouserErrors, so on stores whose first variant is out of stock every add showed up as a0xline and the +/- buttons appeared dead. It now adds the first variant withavailableForSale == true, marks out-of-stock products and lines, and reports it when Shopify clamps a requested quantity. (Pre-existing behaviour, not specific to 2026-07.)
Migration guide:
- Replace
image.originalSrcwithimage.url. - Replace
option.values(strings) withoption.optionValues.map((v) => v.name). - Replace
order.totalPriceV2etc. withorder.totalPrice(drop theV2suffix). - Replace
CartBuyerIdentityInput(deliveryAddressPreferences: [...])with eitherCartInput(delivery: CartDeliveryInput(addresses: [...]))on create, orShopifyCart.addDeliveryAddresses(...)on an existing cart, and read addresses back fromcart.delivery. - Remove any use of
localization.market/country.market.
2.8.3 #
cartDiscountCodesUpdate: optional warnings (CartWarningCodeerrorCode+ localizedmessage) surfaced onCartDiscountCode. When a discount code is not applicable, the payload-levelwarnings(errorCode/errorMessage) are attached to the correspondingCartDiscountCodeviacopyWithafter parsing. These fields are absent from thediscountCodesJSON, sofromJsonleaves them null.
2.8.2 #
- Fix Shopify-side validation error
Nullability mismatch on variable $discountCodes and argument discountCodes ([String!] / [String!]!)fromShopifyCart.updateCartDiscountCodesagainst newer Storefront API versions (e.g.2026-01) that promoted thecartDiscountCodesUpdateargument from[String!]to[String!]!. The SDK's mutation document still declared the variable as the older nullable type, so the server rejected the request. Promoted the variable to[String!]!. Per the GraphQL spec ("All Variable Usages Are Allowed"), a non-null variable is also valid for the older nullable argument shape, so this change is forward- and backward-compatible across Storefront API versions; the Dart caller signature (required List<String> discountCodes) already enforces non-null.
2.8.1 #
- Added
queryRequestTimeouttoShopifyConfig.setConfigto set the GraphQL query timeout.GraphQLClientdefault timeout of 5s causes issue on late HTTP requests
2.8.0 #
- Added
storefrontCacheandadminCacheoptional parameters toShopifyConfig.setConfig, allowing callers to inject a customGraphQLCache(e.g. backed byHiveStorefor disk persistence) for the Storefront and Admin API clients. Defaults preserve the previous in-memory behaviour.
2.7.0 #
- Added category information in all product related gql.
- Updated example to show the product category
2.6.3 #
- Updated the "if" conditions with the null aware operator "?"
2.6.1 #
- Update dependencies and upgrade to next freezed version
- Upgraded example app android platform
2.6.0 #
- Removed published and updated date from product
2.5.6 #
- Added
sellingPlanAllocationsto the Order Item Variant
2.5.5 #
- GraphQL Intl plugin compatibility
- Generate toJson for nested models
- Updated example app
2.5.4 #
- Update type of
adjustmentPercentagetonumso that it works for both int and double data types
2.5.3 #
- Added
reverseflag in cart- If the
reverseis set to true, the line items in the cart will be in reverse order.
- If the
2.5.2 #
- Made phone number option on user/customer creation
- Better error handling
- Updated readme file for better experience
2.5.1 #
updateCartAttributes()mutation fix
2.5.0 #
- Added
attributesto cartattributesto cart line itemsupdateCartAttributes()to update the attributes associated to cart
2.4.0 #
- Added metafield support to products and collections
2.3.3 #
- Minor fixes in product selling plan allocations
2.3.1 #
- Upgraded SDK version to '>=3.3.0 <4.0.0'
- Upgraded Intl version
2.3.0 #
- Added Selling Plan Allocations in product variants
2.2.8 #
- Cart Line Input Model updated
2.2.7 #
- Cart Customer: made properties nullable
- phone, email, firstName and lastName
2.2.6 #
- Cart issue resolved when passed customer access token
2.2.5 #
- Resolved cartline issue when adding line items
- Upgraded
flutter_inappwebviewto latest in example app
2.2.3 #
- Added cart line cost in cart line items Graph Query
2.2.1 #
- moved
countryCodetoShopifyLocalizationclass. This class is responsible to handle the store localization- If set as 'NP', all the prices will be in the form of
Nepali Rupees
- If set as 'NP', all the prices will be in the form of
- Added
discountAllocationsinCartandCartLine.linesitems
2.2.0 #
- Added a feature to set the desired country code to display the prices
- In
ShopifyConfig, set the decired county code to propertycountryCode.- If left null, the shopify default price currency will be applied
- If set as 'NP', all the prices will be in the form of
Nepali Rupees
- In
- Updated example app to reflect the changes.
2.1.2 #
- made phone as required while creating user using
createUserWithEmailAndPassword
2.1.1 #
- ability to get the cached current user or updated user from
ShopifyAuth.currentUserusing a boolean value of forceRefresh - added
productin cart line merchandise to access the product properties like title.
2.1.0 #
- Removed depreciated proprty lastIncompleteCheckout from ShopifyUser
2.0.1 #
- Updated default api version to 2024-01
- Added code comments for better pub score
2.0.0 #
Major Updates:
- Depreciated ShopifyCheckout from Shopify API version 2024-07
- Introduced ShopifyCart to perform cart operation
- Introduced ShopifyOrder to access customer orders
1.5.21 #
1.5.19 #
- minor update in example and getAllOrders
1.5.18 #
- increase the number of varients in products
- auto renew token in
ShopifyAuth.instance.currentCustomerAccessTokenif it is about to expire. - added media list in products
1.5.17 #
- formatted the code to inscreate the pub score
1.5.16 #
- code refactoring
1.5.15 #
- updated example
1.5.14 #
- added cursor to the
getSearchedProductsquery.
1.5.13 #
- null check for shipping address in orders
- made first name nullable in shipping address
1.5.11 #
- formatted code using
dart format .to increase pub score
1.5.10 #
- updated
checkoutCompleteWithTokenizedPaymentV3()to returnTokanizedCheckoutmodel - updated
shop_tab.dartin example to showcase the use ofcheckoutCompleteWithTokenizedPaymentV3()
1.5.9 #
- added a support for locale.
1.5.6 #
- added foormatted price in product price
- added
cachePolicyinShopifyConfigfor GraphQL queries - some bugs fixes
1.5.5 #
- added default address in shopify user
- added method customerDefaultAddressUpdate in ShopifyCustomer class to update the default address
1.5.3 #
- updates to increase pub points
1.5.2 #
- updated dependencies to match latest flutter 3.16.5
1.5.1 #
- updated getAllCollections
- optimized auto-generated files
1.5.0 #
- optimized checkout and product models
1.4.4 #
- update example with demo chekout flow in shop tab
1.4.3 #
- updated example with add, update and remove lineitems for checkout
1.4.2 #
- Minor fixes
1.4.1 #
- Fixed issues
1.4.0 #
1.3.1 #
- Image issue in Collection resolved
- Order Model updated
1.3.0 #
- added search product query and option for filters in
searchProductsandgetXProductsAfterCursorWithinCollection.
1.2.0 #
- phone and acceptsMarketing can be passed in createUserWithEmailAndPassword
- bug fixes
- updated code documentation
1.1.3 #
- now you can get the token with expiry date and get the boolean status of access token expiration
1.1.2 #
- minor update
1.1.1 #
- issue fixed
- checkoutCompleteWithTokenizedPaymentV3 'Field 'payment' doesn't exist
1.1.0 #
- added ShopifyCustom to give the suer an ability to create custom query and mutations that are not available in the package
1.0.19 #
- updated readme
1.0.18 #
- updated signup and readme
1.0.17 #
- checkoutDiscountCodeApply returns Checkout object
1.0.16 #
- Updated Example
1.0.15 #
- Updated Shop model to get shippingPolicy and subscriptionPolicy
1.0.14 #
- Shopify Blogs issue fixes
1.0.13 #
- get all products error fixes
1.0.12 #
- made shopify admin access token optional as it is only used for deleting the customer
1.0.11 #
- added product relation in the Checkout lineitem
1.0.10 #
- added update email in checkout
1.0.9 #
- checkout lineitem update fixes
1.0.8 #
- Fixed error getting in order history when the the purchased product is archieved
- added billingAddress in getAllOrdersQuery and orders
1.0.7 #
- Bug fixes in registeration
1.0.6 #
- Bug fixes while deleting customer account
1.0.5 #
- Optimized orders query and product isAvailableForSale
1.0.4 #
- Added get collection by id
1.0.3 #
- Code optimization
1.0.2 #
- added 'email' in checkout product for eacy checkout experience if logged in
1.0.1 #
- add 'isAvailableForSale' in product and CustomerUpdate bug fixes
1.0.0 #
- updated shopify config to add admin access token.
- delete customer mutation
0.0.4 #
- added payment status and fulfilment status in order
0.0.3 #
- Bug fixes in order, product and checkout models.
0.0.2 #
- Added comments, Readme and example update
0.0.1 #
- Initial Release
