패키지, 저장소 및 앱 카테고리 검색

패키지 상세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 앱을 구축하고 있습니다
  • 전자상거래 스타트업
  • 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.