shopify_flutter
4.2.0, released 8 weeks ago by sujangainju.com.np
Connects your Shopify store with your Flutter application using the Storefront API.
What it does
Acts as a bridge between Shopify and Flutter, providing methods for authentication, product catalogs, carts, orders, and custom GraphQL queries. It wraps GraphQL requests and handles Shopify-specific data models like products, variants, collections, and carts.
AI-written summary of version 4.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a custom e-commerce mobile or web app powered by Shopify.
- You need to manage Shopify storefront authentication, cart operations, and product queries directly in Dart.
Skip it when
- You are using old Shopify Checkout APIs (which have been shut down; use Carts instead).
- You prefer a generic GraphQL client and want to write all GraphQL queries manually without a wrapper.
Strengths
- Covers a comprehensive set of Shopify Storefront features (Auth, Store, Cart, Order, Customer, Blog, Page).
- Unified error handling via `ShopifyException` covering both network issues and GraphQL/user errors.
- Supports custom queries and mutations for advanced use cases.
Weaknesses
- Requires maintaining exact field compatibility if you modify models and their corresponding GraphQL documents.
- Tied tightly to Shopify's versioning and API schemas.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 5
Configure ShopifyConfig in main() with your storefront access token and store URL.
void main() {
ShopifyConfig.setConfig(
storefrontAccessToken: '*******************',
storeUrl: '*****.myshopify.com',
);
runApp(MyApp());
}Alternatives
Packages that do the same job and could replace shopify_flutter.
Works with
Packages commonly used together with shopify_flutter: ones it builds on, ones built on it, and its own family.
- json_annotationshopify_flutter depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- intlshopify_flutter depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- shared_preferencesshopify_flutter depends on itFlutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.
- freezed_annotationshopify_flutter depends on itAnnotations for the freezed code-generator.
- graphql_fluttershopify_flutter depends on itA GraphQL client for Flutter with widget wrappers and hooks.