flutter_simple_shopify 是一個專為簡化 Shopify 商店移動應用開發過程而設計的 Flutter 套件。它提供與 Shopify API 的流暢整合,讓開發者能有效取得產品資料、管理購物車並處理結帳流程。該套件將複雜的 API 互動抽象成直覺的方法,減少冗餘程式碼,加速開發進程。透過最少的設定,支援 storefront 應用所需的關鍵電商功能。
適用情境
建構 Shopify 商店應用
獲取產品和商品數據
實現購物車和結帳功能
在Flutter中整合Shopify API
建立行動電商解決方案
主要特色
輕鬆整合 Shopify API
產品和集合獲取
購物車和結帳管理
所需設定最少
乾淨、開發者友善的 API
適合對象
Flutter 開發人員建構 Shopify 應用
電子商務初創企業
擁有 Shopify 商店的行動應用程式創作者
尋求快速 Shopify 集成的開發者
使用建議
僅限基本的電子商務功能
無內建驗證處理
需要手動錯誤管理
依賴外部 Shopify API 的穩定性
不適用於進階 Shopify 自訂
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
flutter_simple_shopify
A new Flutter package which provides help in creating a mobile app of a shopify store.
Note: This library as of right now is not ready for productionhowever we finished creating our own app and used the library.
There are still minor bugs here and there but we advise everyone to start using the library and post as many issues as possible.
If there are questions about the usage feel free to hit us up on our mail address.
How To Use
I Assume you have already a private app on your Shopify store. if not please follow this.
At step 6 we recommend checking every API permission as some queries and mutations require permission on objects like product tags.
First of all configure the ShopifyConfig like that:
voidmain() {
ShopifyConfig.setConfig(
'de16cae1ce0b86260703fccaa6b689a3', // Storefront API access token.'exampleShopname.myshopify.com', // Store url.'2020-04'); // The Shopify Storefront API version.runApp(MyApp());
}
These are the five possible instances, each contains different methods which will help you with working with the Shopify Storefront API.
The goal is to make creating an mobile app from your Shopify website easier.
Above you see the instance on top and the possible methods and functions which you can use.
Getting Started
This project is a starting point for a Dart
package,
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.
Contribution
Everybody can contribute and is invited to do so!
Important: if you add a new field to a model please consider also adding this to every mutation/query that is associated with the model.
eg. adding a new field to Checkout which is the webUrl, now you will need to go through the various queries/mutations and search for "Checkout" and add webUrl to each one of those.
(adding a new field to a Model also requires you to update the fromJson)
Also I would like to thank everyone who contributed so far!