パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.0.25-alpha

flutter_simple_shopify

Shopifyストアのモバイルアプリ作成を支援する新しいFlutterパッケージ。

30日間ダウンロード
145
いいね数
63
Pub ポイント
40

パッケージをインストール

flutter pub add flutter_simple_shopify

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

flutter_simple_shopify は、Shopifyストア用のモバイルアプリを構築するプロセスを簡素化することを目的としたFlutterパッケージです。Shopify APIとのスムーズな統合を提供し、開発者が製品データを取得し、カートを管理し、チェックアウトフローを効率的に処理できるようにします。複雑なAPI操作を直感的なメソッドに抽象化することで、ボイラープレートコードを減らし、開発を迅速化します。最小限のセットアップで、ストアフロントアプリに必要な基本的な電子商取引機能をサポートしています。

用途

  • Shopifyストアフロントアプリの構築
  • 製品およびコレクションデータの取得
  • カートおよびチェックアウト機能の実装
  • FlutterでShopify APIを統合する
  • モバイルコマースソリューションの作成

主な機能

  • 簡単な Shopify API 統合
  • 製品およびコレクションの取得
  • カートとチェックアウト管理
  • 最小限のセットアップが必要
  • クリーンで開発者フレンドリーな API

適している対象

  • Flutter開発者がShopifyアプリを構築しています
  • ECスタートアップ
  • Shopifyストアを持つモバイルアプリ作成者
  • 迅速なShopify統合を求める開発者

注意事項

  • 基本的な電子商取引機能に限定
  • 組み込みの認証処理なし
  • 手動でのエラー管理が必要です
  • 外部のShopify APIの安定性に依存しています
  • 高度なShopifyカスタマイズには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

flutter_simple_shopify

pub package Build

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 production however 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:

void main() {
  
  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.

  ShopifyAuth shopifyAuth = ShopifyAuth.instance;
    Future<ShopifyUser> createUserWithEmailAndPassword({@required String email, @required String password})
    Future<void> signOutCurrentUser()
    Future<void> sendPasswordResetEmail({@required String email})
    Future<ShopifyUser> signInWithEmailAndPassword({@required String email, @required String password})
    Future<ShopifyUser> currentUser()
  ShopifyStore shopifyStore = ShopifyStore.instance;
     Future<List<Product>> getProductsByIds()
     Future<List<Product>> getXProductsAfterCursor(int limit,String startCursor)
     Future<List<Product>> getAllProducts()
     Future<List<Product>> getNProducts({@required int n, @required SortKey sortKey})
     Future<Shop> getShop()
     Future<Collection> getFeaturedCollection()
     Future<List<Collection>> getAllCollections()
     Future<List<Product>> getXProductsAfterCursorWithinCollection(String id, int limit, String startCursor, SortKeyProduct sortKey)
     Future<List<Product>> getAllProductsFromCollectionById(String id)
     Future<List<Product>> getAllProductsOnQuery(String cursor, SortKeyProduct sortKey, String query)
     Future<List<Product>> getXProductsOnQueryAfterCursor(String cursor, int limit, SortKeyProduct sortKey, String query)
     Future<List<Metafield>> getMetafieldsFromProduct(String productHandle, {String namespace})
  ShopifyCheckout shopifyCheckout = ShopifyCheckout.instance;
    Future<Checkout> getCheckoutInfoQuery({String checkoutId})
    Future<Checkout> getCheckoutInfoWithAvailableShippingRatesQuery({String checkoutId})
    Future<List<Order>> getAllOrders({String customerAccessToken})
    Future<void> checkoutLineItemsReplace({String checkoutId, List<Map<String,dynamic>> checkoutLineItems})
    Future<void> checkoutCustomerAssociate({String checkoutId, String customerAccessToken}) 
    Future<void> checkoutCustomerDisassociate({String checkoutId})
    Future<void> checkoutDiscountCodeApply({String checkoutId, String discountCode})
    Future<void> checkoutDiscountCodeRemove({String checkoutId})
    Future<String> createCheckout()
    Future<void> checkoutGiftCardAppend(String checkoutId, List<String> giftCardCodes)
    Future<void> checkoutGiftCardRemove(String appliedGiftCardId, String checkoutId)
    Future<void> shippingLineUpdate(String checkoutId, String shippingRateHandle)
    Future<void> checkoutCompleteFree(String checkoutId)
    Future<void> updateAttributes(String checkoutId, {bool allowPartialAddresses, Map<String, String> customAttributes, String note})
  ShopifyCustomer shopifyCustomer = ShopifyCustomer.instance;
     Future<void> customerAddressUpdate({String address1, String address2, String company, String city, String country, String firstName, String lastName, String phone, String province, String zip, String customerAccessToken, id})
     Future<void> customerUpdate({String email, String firstName, String lastName, String password, String phoneNumber, String customerAccessToken, bool acceptsMarketing})
     Future<void> customerAddressCreate({String address1, String address2, String company, String city, String country, String firstName, String lastName, String phone, String province, String zip, String customerAccessToken})
     Future<void> customerAddressDelete({String customerAccessToken, String addressId})
       
  ShopifyBlog shopifyBlog = ShopifyBlog.instance;
     Future<List<Blog>> getAllBlogs()
     Future<Blog> getBlogByHandle(String handle, SortKeyArticle sortKeyArticle)
     Future<List<Article>> getXArticlesSorted({int articleAmount, SortKeyArticle sortKeyArticle})

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!

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。