Getting started
ShopNative comes ready to run. The project is connected to our demo store (Luma Store), so you can build it and see a working app before you change anything. Then connect your own Shopify store in a few steps.
Costs at a glance: what you pay, besides this item
What Who charges it Price (at the time of writing) Needed for Shopify plan Shopify your Shopify subscription (see shopify.com/pricing) The store the app shows. The Headless sales channel is free Apple Developer Program Apple US$99 per year, every year Publishing on the App Store, TestFlight, iOS push notifications Google Play developer account US$25, once Publishing on Google Play Payment processing Shopify Payments / your provider per transaction Card and wallet payments Paid Shopify apps their developers optional Only if you choose to use them Firebase Cloud Messaging is free; other Firebase services may be paid Only the optional push add-on None of these are included in the item price. Shopify, Apple and Google set their own prices, which may differ by country and may change. Building and testing the app on your own phone costs nothing.
What you get: the screens
Every screen below is in the download, shown with the Luma demo store.
Shopping
Home · Collections · "Shop by collection" rows · Search · Side menu · Product detail · Product options and sale price · Wishlist · Notifications · Cart
Native checkout (new in 1.0.1, checkout.mode: "native"): contact and address, Shopify's shipping methods and
prices, discount code and total in the app; "Continue to payment" opens Shopify checkout with everything filled in.
Customer account (shown with the sample review account, see review.demoEmail in Configuration)
Account · Orders with status · Addresses · Delete account (sends the request to your page or email)
Dark mode and Arabic (right to left): the same screens, switched in Settings. In Arabic the whole layout mirrors: menu and back button on the right, text right-aligned, banners flipped.
Dark home · Dark product · English home next to Arabic home · Arabic product
1. Install the tools
- Flutter 3.47 or newer (Dart 3.13+; tested with 3.50.0): https://docs.flutter.dev/get-started/install
- Android: Android Studio with the Android SDK (the app runs on Android 7.0 / API 24 and newer)
- iOS (optional): a Mac with Xcode (the app runs on iOS 15 and newer)
Check your setup with flutter doctor.
2. Build the demo app (no changes needed)
Unzip the download and open a terminal in the shopnative folder (the folder that contains pubspec.yaml):
Windows: unzip to a short path such as
C:\dev\ShopNative. Very long folder paths (over 260 characters, e.g. deep inside Downloads or a synced folder) make the Flutter tool fail with "Directory listing failed".
flutter pub get
flutter run # on a connected phone, emulator or iOS simulator
Or build an installable APK:
flutter build apk --debug # → build/app/outputs/flutter-apk/app-debug.apk
flutter build apk --release # → build/app/outputs/flutter-apk/app-release.apk
The release APK is signed with the debug key until you add your own (see step 4). You can also open the
shopnative folder in Android Studio or VS Code and press Run.
What to try in the demo
- Home: banners, New Arrivals, "Shop by collection" rows built from the store menu
- Collections, search, a product with sizes and colours (sold-out options are struck through), sale prices
- Cart, wishlist, notifications
- Settings (side menu): light / dark mode and English / Arabic (right-to-left)
- Account: sign in with any email address; Shopify sends a one-time code
- Checkout: the demo is a Shopify development store, which is password protected. Checkout shows Shopify's
password page unless you are signed in; the demo store password is
123456789. Your own (paid) store does not have this page.
Run the tests (optional)
flutter test
3. Connect your own store
- Set up the free Shopify Headless channel and copy your keys: Shopify setup.
- In
assets/app-config.json, replace the demo values instore(domain,storefrontToken,customerAccountClientId,customerAccountRedirectUri) with yours. - Replace the four demo banners in
home.bannerswith your own images (or remove them). - Change
app.id(for examplecom.yourcompany.store) andapp.name, then run:dart run tool/rebrand.dart flutter runagain: the app now shows your products.
Then follow the Rebranding checklist for your logo, app icon and colours. Every setting is described in Configuration.
The demo store keys in
app-config.jsonare public Storefront and Customer Account keys (the same kind every Shopify app ships with). They only allow reading products and creating carts on the demo store. The demo store is kept online for testing, but it may change at any time: always connect your own store before you publish.
4. Publish
When the app shows your store and your brand, build the release versions:
flutter build appbundle --release --obfuscate --split-debug-info=build/symbols # Google Play
flutter build ipa --release --obfuscate --split-debug-info=build/symbols # App Store (on a Mac)
For Google Play, sign the app with your own key: copy android/key.properties.example to android/key.properties
and point it to your keystore. Without it, release builds use the debug key (fine for testing, not for Google Play).
iOS privacy manifest: ios/Runner/PrivacyInfo.xcprivacy (included, already in the Xcode project) tells Apple
what the app collects: name, email, phone, address and purchase history, sent only to Shopify for your store's
features, no tracking. If you add services (the push add-on, analytics, ads), update it and your App Store privacy
details to match.
5. Project structure
shopnative/
assets/
app-config.json your store, brand, home page and support settings (see Configuration)
brand/ logo, symbol and app icon images
i18n/ one JSON file per language (en.json, ar.json)
lib/
main.dart starts the app: creates the AppStore, then runs ShopNativeApp
app.dart ShopNativeApp: theme, languages, right-to-left
config/ app_config.dart (reads app-config.json), theme.dart (light and dark themes)
data/ Shopify connection: storefront_api.dart, customer_account_api.dart, disk cache
models/ product, catalog, cart and customer models
state/ app state (cart, catalog, customer, settings), shared through StoreScope
i18n/ strings.dart: loads the translations from assets/i18n
ui/
shell/ app frame: header, bottom bar, side menu, search, links from notifications
screens/ one file per screen: home, collections, product, cart, checkout, account, ...
kit/ small reusable widgets: buttons, product card, glass panels, images
addons/push/ optional push notifications add-on (Firebase)
tool/rebrand.dart applies app id, name and version to Android and iOS
tool/migrate_imports.dart updating from 1.0.0: rewrites old material/cupertino imports in your own code
test/ unit and widget tests (flutter test)
android/ ios/ native projects (normally you only change them through rebrand.dart)
Most changes need only assets/: store keys, colours, banners, menus and texts. Change the code in lib/ui/ when you
want a different layout. How the parts talk to each other, and where to add a screen or state:
Architecture.
Shopify setup
ShopNative talks to your store through two official Shopify APIs. Both are set up in the free Headless sales channel. No Shopify app or server is needed.
Costs: Shopify is a third-party service. You need your own Shopify store and plan, and you are responsible for any Shopify fees (subscription, payment processing, apps). These costs are not covered by the ShopNative purchase price. The Headless sales channel itself is free.
| API | Used for | What you copy into assets/app-config.json |
|---|---|---|
| Storefront API | Products, collections, menu, search, cart, checkout | store.storefrontToken |
| Customer Account API | Sign in, profile, orders, addresses | store.customerAccountClientId, store.customerAccountRedirectUri |
1. Install the Headless channel
- Shopify admin → Settings → Apps and sales channels → Shopify App Store, search Headless, install it (made by Shopify, free).
- Open Sales channels → Headless → Create storefront.
2. Storefront API token
- In your storefront: Storefront API → Manage.
- Copy the Public access token into
store.storefrontToken. - Put your shop domain in
store.domain, e.g.your-store.myshopify.com.
Never use the private token or an Admin API token (starting with
shpat_). Those give full access to your store and must never be put in an app. ShopNative refusesshpat_tokens.
Permissions: the Headless channel's default Storefront API permissions are enough. If you changed them, make sure products, collections, navigation menus, inventory (for "sold out") and checkouts are allowed.
3. Customer login (Customer Account API)
- In your storefront: Customer Account API → Manage.
- Client type → Public (mobile app). "Public (web app)" will not work and shows "Invalid redirect_uri scheme".
- Copy the Client ID into
store.customerAccountClientId. - Find your shop ID: it is the number in the Authorization endpoint shown on the same page, e.g.
https://shopify.com/authentication/71533101190/oauth/authorize→71533101190. - Under Callback URI(s) add exactly:
Do not addshop.<your-shop-id>.app://callbackhttps://in front, even though the page says "include HTTPS". If you see "Redirect uri is not secured", the client type is still "web app" (step 2). - Put the same value in
store.customerAccountRedirectUri. - Customer accounts must be on: Settings → Customer accounts → Customer accounts (the new version).
When a customer is signed in in the app, checkout opens signed in too (saved addresses, order linked to the account).
How the session is stored: the customer's access, refresh and ID tokens (and the cached profile) are kept in
secure platform storage with flutter_secure_storage: the iOS
Keychain (this device only, never synced) and Android Keystore-backed encryption. They are never written to
SharedPreferences; a session saved there by an older version is moved to secure storage on the first start and
deleted. Android auto backup is turned off (android:allowBackup="false") so encrypted data is not restored to a
device without the matching key. Signing out deletes the session.
4. Collections, menu and images
| In Shopify | Used in the app |
|---|---|
| Collections that have products | Collections tab (all of them, with their image) |
Content → Menus → Main menu (handle main-menu) |
Side menu, and "Shop by collection" rows on the home screen (a top-level item with collection sub-items becomes a row with chips) |
A collection for new products, e.g. handle new-arrivals |
"New Arrivals" row (home.newArrivalsCollection) |
| Collection image (1200 × 1200, subject centered) | Collection tiles |
| Product images | Product cards, gallery, cart, orders |
| Settings → Policies | Policies screen (refund, shipping, privacy, terms) |
Upload images to Shopify (Content → Files), step by step
Banner images (home.banners) and other pictures the app loads from a URL are kept in Shopify's file storage:
- Prepare the image. Banners: 1600 × 900 px, JPG or WebP, under 300 KB, with the text zone kept calm (see the banner diagram).
- In Shopify admin, open Content in the left menu, then Files.
- Click Upload files (top right) and pick the image on your computer. You can also drag it onto the page.
- Wait until the row shows the file name and size (a few seconds).
- In that row, click the link icon ("Copy link"). The address starts with
https://cdn.shopify.com/. - Open
assets/app-config.json, find the banner inhome.bannersand paste the address as its"image"value, between the quotes. - Save the file and run the app again (
flutter run). Changing a banner later means changing this file and building a new app version.
Menu items that are not collections also work: / opens Home, /pages/contact opens Contact, product links open the
product, other links open in the in-app browser.
5. Checkout and payments
With checkout.mode: "native" (the default) the app first shows its own checkout screen: contact, delivery
address, Shopify's shipping methods with their prices, discount code, order note and total. Continue to payment
then opens Shopify checkout with all of it filled in; the customer only picks how to pay. With "webview" the cart
goes straight to Shopify checkout.
Payment itself is always Shopify's own checkout, shown inside the app. Payments, taxes, shipping, discounts and order emails all come from your Shopify settings. After a successful order the app closes checkout, empties the cart and shows a thank-you screen.
Development stores are password protected; checkout asks for the store password unless the customer is signed
in. To test payments use Settings → Payments → (for testing) Bogus Gateway and card number 1.
Troubleshooting
Quick check: what the app needs from your store
- The free Headless sales channel is installed and the public Storefront token is in
store.storefrontToken.- Your products and collections are available on the Headless channel (product page → Publishing).
- For sign-in: Customer Account API client type Public (mobile app), and the same callback URI (
shop.<id>.app://callback) in Shopify and instore.customerAccountRedirectUri.- The phone can reach
your-store.myshopify.comandshopify.comover HTTPS (some company or school Wi-Fi networks block them; try mobile data).Shopify hosts everything, so there is no server, cache or firewall of your own to set up.
| Message | Fix |
|---|---|
| "Missing Shopify Storefront API token" | store.storefrontToken is empty or still YOUR_.... |
| "...is a Shopify Admin API token" | You pasted a shpat_ token. Use the public Storefront token. |
| Login: "Invalid redirect_uri scheme" | Client type must be Public (mobile app). |
| Login: "Redirect uri is not secured" | Same as above; then add the callback without https://. |
| Login opens but never returns to the app | customerAccountRedirectUri in the config must match the callback URI in Shopify exactly. Rebuild the app after changing it. |
| Collections tab is empty | Collections need at least one product and must be available on the Headless channel. |
| Home has no "Shop by collection" rows | Add collections with sub-collections to the Main menu. |
| Windows: "Directory listing failed" / "cannot find the path" | The project folder path is too long. Move it to a short path such as C:\dev\ShopNative. |
| Checkout shows a password page | Development store: sign in first, or enter the store password. |
Configuration reference
Everything is configured in one file: assets/app-config.json. No Dart code changes are needed.
After editing:
- Android: just rebuild (
flutter run/flutter build). Android reads the app identity directly from this file. - iOS: run
dart run tool/rebrand.dartonce after changing theappsection, then rebuild.
Text values starting with YOUR_ are treated as empty.
app: identity
| Key | Example | Notes |
|---|---|---|
id |
com.yourbrand.store |
Package name (Android) and bundle ID (iOS). Cannot be changed after the first store upload. |
name |
Your Store |
Name under the app icon. |
version |
1.0.0 |
Version shown in the stores. |
build |
1 |
Increase by 1 for every upload to Google Play / App Store. |
store: Shopify connection
See SHOPIFY_SETUP.md for where to find each value.
| Key | Required | Notes |
|---|---|---|
domain |
yes | your-store.myshopify.com |
storefrontToken |
yes | Public Storefront API access token |
customerAccountClientId |
for login | Customer Account API client ID (client type: Public, mobile app) |
customerAccountRedirectUri |
for login | shop.<shop-id>.app://callback (no https://) |
websiteUrl |
no | Your public website, used for product links and policy pages. Default: https://<domain> |
policies |
no | Links for the Policies screen: privacy, refund, shipping, terms. Empty: the Shopify policy page (<websiteUrl>/policies/...). A full URL: that page (use it when the store is password-protected or the policy is on another site). "off": not listed. |
apiVersion |
no | Storefront API version, default 2026-04 |
brand
| Key | Notes |
|---|---|
name |
Store name in texts (footer, messages). |
tagline |
Shown on the startup screen (spaced capitals). Optional. |
logoAsset / logoAssetDark |
Header logo bundled in the app (PNG, about 600 px wide), for light and dark mode. |
symbolAsset / symbolAssetDark |
Startup screen symbol (PNG). |
logoUrl |
Header logo from a URL, used when no logoAsset is set. If neither is set, the name is shown as text. |
themeMode |
system, light or dark: the default before the user picks one in Settings. |
colors |
Light mode colours (below). |
darkColors |
Dark mode colours, same keys. Optional: derived from colors when missing. |
Colours (#RRGGBB or #AARRGGBB):
| Key | Used for |
|---|---|
primary |
Buttons, prices, links, selected states, badges |
primarySoft |
Light tint for chips and soft buttons (derived from primary if omitted) |
onPrimary |
Text on primary buttons. Use dark text when primary is light. |
textPrimary |
Headings and important text |
textSecondary |
Body text, hints, captions |
background |
Screen background (also the Android launch screen, via tool/rebrand.dart) |
surface |
Cards, inputs, panels |
border |
Outlines of inputs, cards, chips |
icon |
Header and navigation icons |
favorite |
Active wishlist heart |
sale |
"Sale" badge on products with a compare-at price |
error |
Error messages and destructive actions |
Check contrast: text on background and onPrimary on primary should be at least 4.5 : 1.
i18n: languages
| Key | Example | Notes |
|---|---|---|
languages |
["en", "ar"] |
Languages users can pick in Settings. Each needs assets/i18n/<code>.json. |
defaultLanguage |
en |
Language on first start. |
Right-to-left layout is automatic for Arabic, Persian, Hebrew and Urdu. To add a language, copy assets/i18n/en.json
to e.g. fr.json, translate the values (keep the keys and {placeholders}), and add "fr" to languages.
The test suite checks that every language has all keys.
home
| Key | Notes |
|---|---|
menuHandle |
Shopify navigation menu used for the side menu and home rows. Default main-menu. |
newArrivalsCollection |
Collection handle for the "New Arrivals" row. |
allProductsCollection |
Collection used for the full catalog. Default all (Shopify's built-in all-products collection). |
banners |
Home carousel, see below. Remove all items to hide it. |
Banners:
{
"collection": "new-arrivals",
"image": "https://cdn.shopify.com/.../banner.webp",
"eyebrow": { "en": "New season", "ar": "موسم جديد" },
"headline": { "en": "Wear the light", "ar": "ارتدِ النور" },
"button": { "en": "Shop now", "ar": "تسوّق الآن" }
}
| Key | Notes |
|---|---|
collection |
Collection handle opened on tap (required). |
image |
URL (upload to Shopify → Content → Files) or a bundled path starting with assets/. 1600 × 900 px, JPG/WebP under 300 KB. |
eyebrow, headline, button |
Optional text drawn over the image. A plain string, or one value per language. |
With text, keep the left 45 % of the photo calm (the text sits there) and the subject on the right; keep the bottom-right corner clear (page counter). In right-to-left languages the photo is mirrored automatically.
The blue area is where the app draws the eyebrow, headline and button: keep it plain (sky, wall, floor, soft blur). Put the person or product in the orange area, and keep the bottom-right corner free for the page counter. Banners without text can use the whole image.
support
title, address, phone, whatsapp, email. Shown on the Contact screen and used by "Check availability" and
"Call for price". Empty values are hidden.
deleteAccountUrl: the page where customers ask for their account to be deleted. Apple requires apps that let
customers create an account to offer deletion in the app (App Store rule 5.1.1(v)). Shopify has no API for customers
to delete themselves, so Account → Delete account sends the request to you: it opens this page, or, when it is
empty, an email to email with the request filled in. Then erase the customer in Shopify admin (Customers → the
customer → Erase personal data). With no page and no email, the button is hidden: set one before an App Store
submission.
features
| Key | Notes |
|---|---|
availabilityCheck |
Shows "Check availability" on product pages (needs at least one support contact). |
taxLabels.enabled |
Shows a tax label next to prices, based on the variant's taxable setting. |
taxLabels.taxable / nonTaxable |
Label texts, e.g. excl. VAT / incl. VAT. |
taxLabels.taxableNote |
Small note under taxable prices. |
Products priced at 0 show Call for price, which contacts the store by WhatsApp, phone or email (first one set).
checkout
"checkout": { "mode": "native", "guest": true }
| Key | Notes |
|---|---|
mode |
native: the app's own checkout screen first (contact, delivery address, shipping method with Shopify's prices, discount code, order note, total). "Continue to payment" then opens Shopify checkout with all of it filled in, where the customer picks how to pay (Cash on Delivery and other manual methods, cards, ...). Shopify only creates orders on its own checkout page, so payment always happens there. webview: Shopify checkout straight away. |
guest |
false: customers must sign in before checkout. Also check Shopify admin → Settings → Customer accounts. |
The countries in the address come from your Shopify markets (the countries you sell to).
review: login for App Store / Google Play review
"review": { "demoEmail": "" }
Store reviewers can't receive Shopify's one-time sign-in code. For the build you send to review, set
demoEmail to an address of your choice (for example review@yourstore.com). On the sign-in screen the app then
asks for the email first:
- that email: signs in at once to a sample account kept on the phone (a name, two orders, one address). Nothing is sent to Shopify, no account is created, and checkout runs as a guest. Addresses the reviewer adds stay on the phone.
- any other email: continues to Shopify's sign-in page with the email filled in, then the normal one-time code.
Write the email in App Store Connect → App Review Information (sign-in required: give the email, no password) and in
Play Console → App content → App access. Leave demoEmail empty in normal builds: with it empty, the sign-in button
opens Shopify's page straight away, exactly as before.
Rebranding checklist
Turn ShopNative into your store's app in about an hour.
1. Identity and store
- Edit
assets/app-config.json:app(id, name, version),store(see SHOPIFY_SETUP.md). - Support contacts: put your own
support.email,support.phoneand/orsupport.whatsappinassets/app-config.json. The download ships with them empty; customers see them on the Contact screen. Never leave the template author's contact in your app. - Run:
dart run tool/rebrand.dart --check # validates the config, warns about missing support contacts, shows changes dart run tool/rebrand.dart # applies it to the iOS project, pubspec and launch screen
2. Logo
Replace these PNG files (keep the names, or change the paths in brand):
| File | Size | Shown |
|---|---|---|
assets/brand/logo.png |
~600 px wide, transparent | Header, light mode |
assets/brand/logo-dark.png |
same | Header, dark mode (light-coloured logo) |
assets/brand/symbol.png |
~240 px wide, transparent | Startup screen, light mode |
assets/brand/symbol-dark.png |
same | Startup screen, dark mode |
No logo yet? Delete logoAsset and logoAssetDark from the config: the header shows your store name as text.
3. App icon
- Replace
assets/brand/app-icon.png: 1024 × 1024, square, no transparency, no rounded corners (iOS and Android round it themselves). Keep the important part inside the middle 60 %. - Replace
assets/brand/app-icon-foreground.png: the same artwork on a transparent background (Android adaptive icon layer), and setadaptive_icon_backgroundinpubspec.yamlto your icon's background colour. - Run
dart run flutter_launcher_icons.
4. Colours
Set brand.colors and brand.darkColors (see CONFIGURATION.md). Run
dart run tool/rebrand.dart again so the launch screen colour matches.
5. Home banners
Upload 1600 × 900 images to Shopify → Content → Files (click-by-click steps in
Shopify setup) and list them in
home.banners with optional text. Where to put the subject and the text: the
banner diagram.
6. Texts and languages
All texts are in assets/i18n/*.json. Change wording there; add or remove languages in i18n.languages.
7. Store listing and review
Before publishing, test on a real device: sign in, add to cart, checkout (with a test payment), dark mode and your languages. Check that the Contact screen shows your support contacts.
Account deletion: set support.deleteAccountUrl (required by Apple, rule 5.1.1(v)). Apps that let customers
create an account must offer deletion in the app. Account → Delete account is included; it sends the request to
you:
- In
assets/app-config.json, setsupport.deleteAccountUrlto a page where customers ask for deletion (for examplehttps://your-store.com/pages/delete-account, a page with a contact form or your email). If you leave it empty, the button opens an email tosupport.emailinstead. With neither set, the button is hidden and the App Store review will fail. - When a request arrives, erase the customer in Shopify admin: Customers → the customer → Erase personal data.
- Google Play also asks for a deletion web page (Play Console → Policy → App content → Data safety /
Account deletion): enter the same
deleteAccountUrl. - A privacy policy URL is required in both stores (Shopify admin → Settings → Policies gives you one).
Review login: set review.demoEmail and write reviewer notes. Store reviewers can't receive Shopify's one-time
sign-in code, so they need the sample account:
- For the build you send to review, set
review.demoEmailto an address of your choice, e.g.review@your-store.com(details: Configuration). That email signs in at once to a sample account on the phone; nothing is sent to Shopify. - App Store Connect → your app → App Review Information → tick Sign-in required, username = that email, password = "none" (no password needed).
- Play Console → Policy → App content → App access → "All or some functionality is restricted" → add the same email and say that no password is needed.
- Paste notes like these into the review notes of both stores:
No sign-in is needed to browse. To see the account, tap the account icon > Sign in, type review@your-store.com and tap Continue: it signs in at once to a sample account (no password, no code). Account deletion: Account > Delete account (opens our deletion request page). Checkout runs on Shopify's own checkout page; you may stop before paying. - Keep the review build's
demoEmailuntil the review is finished; clear it for your normal builds.
Then build:
flutter build appbundle --release --obfuscate --split-debug-info=build/symbols # Google Play
flutter build ipa --release --obfuscate --split-debug-info=build/symbols # App Store (on a Mac)
Keep the build/symbols folder of every release: it is needed to read crash reports. Publishing needs your own
developer accounts: Apple Developer Program (US$99 per year) and Google Play (US$25 once); see the costs in
Getting started.
Architecture (for developers)
How the code fits together, so you can add a screen or extend the state without reverse-engineering the file tree.
There is no state-management package: one ChangeNotifier (AppStore) holds the app state, and Flutter's own
InheritedNotifier (StoreScope) hands it to every screen.
The layers
┌──────────────────────────────────────────────────────────────────────────────────┐
│ UI lib/ui/ │
│ shell/ AppShell: glass header, bottom bar, side menu, search, navigation, │
│ links from banners and notifications │
│ screens/ Home, Collections, Product, Cart, Checkout, Account, Wishlist, ... │
│ kit/ shared widgets: ShellPage, ProductCard, glass panels, buttons │
│ │
│ reads context.store (rebuilds when the state changes) │
│ calls context.readStore (inside onPressed and other callbacks) │
│ opens context.shell.open(SomeScreen()) │
└───────────────────────────────────┬──────────────────────────────────────────────┘
│ StoreScope (InheritedNotifier<AppStore>)
┌───────────────────────────────────▼──────────────────────────────────────────────┐
│ STATE lib/state/ │
│ AppStore = StoreBase + SettingsState + CatalogState + CartState + CustomerState│
│ SettingsState theme mode, language │
│ CatalogState home data, collections, products, search │
│ CartState cart, wishlist, notifications │
│ CustomerState sign in, profile, orders, addresses │
│ app_store.dart also holds checkout (native screen + Shopify checkout URL). │
│ Each part calls notifyListeners() after a change; screens that read │
│ context.store rebuild. │
└───────────────────────────────────┬──────────────────────────────────────────────┘
│
┌───────────────────────────────────▼──────────────────────────────────────────────┐
│ DATA lib/data/ │
│ storefront_api.dart Shopify Storefront API (GraphQL): products, │
│ collections, menu, search, cart, checkout │
│ customer_account_api.dart Shopify Customer Account API: sign in (one-time │
│ code), profile, orders, addresses │
│ review_account.dart sample account for store review (review.demoEmail) │
│ disk_cache.dart offline copy of the catalog and images │
│ models/ product, catalog, cart, customer │
└───────────────────────────────────┬──────────────────────────────────────────────┘
│ HTTPS
Your Shopify store, through the free Headless sales channel
Beside the layers: lib/config/ (assets/app-config.json + light/dark theme), lib/i18n/ (texts)
What happens when
| Moment | Flow |
|---|---|
| App start | main.dart → AppStore.create() loads app-config.json, the saved cart and wishlist, the customer session (secure storage) and the cached catalog. Cached screens show at once; store.refresh() then loads fresh data from Shopify. |
| Home screen | HomeScreen reads context.store.home: banners from app-config.json, "New Arrivals" and the "Shop by collection" rows built from your Shopify menu (home.menuHandle). |
| Add to cart | A button calls context.readStore.addToCart(product, variant). CartState updates the list, saves it on the device and calls notifyListeners(): the cart badge and cart screen rebuild. |
| Checkout | Native mode: the app's checkout screen collects contact, address, shipping method (Shopify's prices) and discount code, then checkoutUrl() creates a Shopify cart with all of it and opens Shopify checkout for payment. Web mode: Shopify checkout straight away. Orders are always created by Shopify. |
| Sign in | customer_account_api.dart opens Shopify's sign-in page (one-time code by email) and returns tokens, kept in flutter_secure_storage (iOS Keychain / Android Keystore), never in plain preferences. |
Add a screen
- Create
lib/ui/screens/size_guide_screen.dart:import 'package:material_ui/material_ui.dart'; import '../../state/store_scope.dart'; import '../kit/page.dart'; import '../kit/texts.dart'; class SizeGuideScreen extends StatelessWidget { const SizeGuideScreen({super.key}); @override Widget build(BuildContext context) { return ShellPage(children: [ PageTitle(context.t('sizeGuide.title')), Text(context.t('sizeGuide.body')), ]); } }ShellPagegives the scrolling page below the glass header, with the right padding and the store footer. - Add the texts to every file in
assets/i18n/("sizeGuide": {"title": "Size guide", "body": "..."}). - Open it from anywhere with
context.shell.open(const SizeGuideScreen())(import../shell/shell_scope.dart). For a side-menu entry, editlib/ui/shell/side_menu.dart.
Add state or a Shopify call
- A value the screens show (for example "recently viewed"): add a field and a method to the part it belongs to
(
catalog_state.dartfor catalog data), change the field, then callnotifyListeners(). Screens read it withcontext.store.recentlyViewed. - A new area with its own data: add
mixin MyState on StoreBaseinlib/state/and add it to theAppStoreclass line inapp_store.dart. - More Shopify data: add a GraphQL query to
storefront_api.dart(public catalog and cart data) orcustomer_account_api.dart(signed-in customer data), and a model inlib/data/models/. Only public Storefront and Customer Account tokens are used; never put an Admin API token (shpat_) in the app.
Rules the code follows
- Screens never call the APIs directly: they go through
AppStore, so caching, offline mode and errors are handled in one place. - The customer session lives only in
flutter_secure_storage. - Every text comes from
assets/i18n/*.json, so new screens work in Arabic (right to left) too. - Tests (
flutter test) run offline from recorded public answers intest/fixtures/; signed-in flows use fakes intest/support/.
Push notifications add-on (optional)
Send notifications ("New collection is live", "Summer sale -30 %") from the free Firebase console. Tapping a notification can open a product, a collection or the cart.
ShopNative ships without Firebase, so the app works without any Firebase account or setup files. Enabling this add-on takes about 20 minutes and adds Firebase Messaging (about 0.3 MB on Android, measured on a release build).
Costs: Firebase is a third-party service from Google and is not part of the ShopNative purchase. You use it with your own Firebase account, and you are responsible for any fees for using Firebase, now or if Google changes its pricing. Firebase Cloud Messaging is free at the time of writing, but other Firebase services or a paid plan (Blaze) may be charged. Check https://firebase.google.com/pricing before you enable the add-on.
iOS needs a paid Apple Developer Program membership. Push on iPhone and iPad only works with an APNs key from your own Apple Developer Program account (US$99 per year, charged by Apple, not included in this item). You need that membership anyway to publish on the App Store; without it, push works on Android only. Android push needs no paid account (Firebase Cloud Messaging is free at the time of writing).
1. Create a Firebase project
- Go to https://console.firebase.google.com → Add project.
- Install the tools (once):
dart pub global activate flutterfire_cli npm install -g firebase-tools # or see https://firebase.google.com/docs/cli firebase login - In the project folder, run and pick your Firebase project, Android and iOS:
This createsflutterfire configurelib/firebase_options.dartand the Firebase config files for Android and iOS.
2. Add the packages and the code
flutter pub add firebase_core firebase_messaging
Copy addons/push/push_notifications.dart to lib/addons/push_notifications.dart.
In lib/main.dart, start it after the store is created:
import 'addons/push_notifications.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
final store = await AppStore.create();
runApp(ShopNativeApp(store: store));
store.refresh();
PushNotifications.init(onMessage: store.addMessage); // ← add this line
}
3. Android
Android 13 and newer ask the user for permission; the add-on does that on first start. Nothing else is needed:
flutterfire configure already added the Google services files.
4. iOS (needs a paid Apple Developer Program membership, US$99 per year)
- In Xcode, open
ios/Runner.xcworkspace→ target Runner → Signing & Capabilities → add Push Notifications and Background Modes → Remote notifications. - In the Apple Developer portal create an APNs Authentication Key (.p8).
- Firebase console → Project settings → Cloud Messaging → Apple app configuration → upload the key, with your Key ID and Team ID.
5. Send a notification
Firebase console → Messaging → New campaign → Notifications:
- Title and text as you like.
- Target: Topic
all(every app user is subscribed). - Additional options → Custom data: key
link, value one of:
| Value | Opens |
|---|---|
/products/<product-handle> |
that product |
/collections/<collection-handle> |
that collection |
/cart |
the cart |
/ |
home |
https://… |
a web page in the in-app browser |
Messages that arrive while the app is open are added to the in-app notifications list (bell icon).
Testing
Run the app in debug mode: the device's push token is printed in the console (Push token: …). In the Firebase
console use Send test message with that token.
Removing it again
Delete lib/addons/push_notifications.dart, the PushNotifications.init line, run
flutter pub remove firebase_core firebase_messaging, and delete lib/firebase_options.dart and the Firebase
config files.
Changelog
1.0.1 (2026-11-25) · Latest
In short: a checkout screen in the app, guest checkout on/off, account deletion and a review login for the App Store and Google Play, configurable policy links, smoother screen transitions and several fixes.
| Flutter | Built and tested with Flutter 3.50.0 (Dart 3.14). Flutter 3.47 or newer is now required (was 3.44). |
| Android | Gradle 9.5.0, Android Gradle Plugin 9.3.1, Kotlin 2.4.20 (Flutter 3.50 needs Gradle 9.3.1+); compileSdk and targetSdk 36 (unchanged) |
| iOS | Privacy manifest added (ios/Runner/PrivacyInfo.xcprivacy) |
| Shopify | No new Shopify settings needed. Optional: switch on Cash on Delivery in Shopify admin → Payments. |
New
- Checkout screen in the app (
checkout.mode: "native", the new default): contact, delivery address, Shopify's own shipping methods and prices, discount code, order note and the total. "Continue to payment" opens Shopify checkout with everything filled in; payment (for example Cash on Delivery) is chosen there."webview"keeps the 1.0.0 behaviour. - Guest checkout on/off (
checkout.guest): setfalseto ask customers to sign in before checkout. - Account → Delete account (Apple rule 5.1.1(v)): sends a deletion request to your page
(
support.deleteAccountUrl) or to your support email. - Review login (
review.demoEmail): one email signs in at once to a sample account on the phone, for App Store and Google Play review (no one-time code needed). Other emails continue to Shopify as before. - Policy links (
store.policies): per policy (privacy, refund, shipping, terms) an empty value keeps the Shopify page, a URL opens that page instead (useful for a password-protected store),"off"hides it.
Improved
- Flutter 3.50 ready: Material and Cupertino widgets now come from the official
material_uiandcupertino_uipackages (Flutter deprecated its built-in copies), soflutter analyzeis clean on Flutter 3.50. - Screen transitions: each platform's own transition (Android predictive back, iOS slide with swipe-back); tab switches fade through. The previous screen no longer shows through the new one.
- Support contacts ship empty: add your own email, phone or WhatsApp.
dart run tool/rebrand.dart --checkwarns until one is set. New "Support contacts" step in the rebranding guide. - The app's
pubspec.yamlno longer lists packages only the author's release tool used. - Template support email is now hello@devapptics.com.
Fixed
- Password-protected store (for example a development store): checkout opens again right after the store password instead of landing on the store's home page.
- The floating bottom bar no longer rises above the keyboard over checkout fields or the country list (only for its own search field).
- A discount code warning from Shopify shows under the discount field, not with the shipping options.
- Review login: sample orders show real demo-store products, and deleting the account shows "Account deleted".
Updating from 1.0.0
- Keep a copy of your current project. Unzip 1.0.1 into a new folder.
- Copy over your own files:
assets/app-config.json(then add the new keys below), your images inassets/, your translations inassets/i18n/(add the new keys from the 1.0.1en.json), and your Android signing files (android/key.properties, keystore). - New keys in
assets/app-config.json(add them to your copy; leaving them out keeps the defaults):
("checkout": { "mode": "native", "guest": true }, "review": { "demoEmail": "" }, "support": { "deleteAccountUrl": "" }, "store": { "policies": { "privacy": "", "refund": "", "shipping": "", "terms": "" } }supportandstorealready exist: add only the new keys inside them.) - Use Flutter 3.47 or newer (3.50.0 recommended). Run
flutter clean,flutter pub get,dart run tool/rebrand.dart, thendart run tool/rebrand.dart --check. - If you changed Dart code yourself, these files changed in 1.0.1; merge your edits into them:
- New:
lib/data/models/checkout.dart,lib/data/review_account.dart,lib/ui/screens/account/sign_in_prompt.dart,lib/ui/screens/checkout/checkout_flow.dart,lib/ui/screens/checkout/native_checkout_screen.dart,ios/Runner/PrivacyInfo.xcprivacy - Changed:
lib/config/app_config.dart,lib/config/theme.dart,lib/data/customer_account_api.dart,lib/data/storefront_api.dart,lib/state/app_store.dart,lib/state/customer_state.dart,lib/ui/kit/states.dart,lib/ui/screens/account/account_screen.dart,lib/ui/screens/cart_screen.dart,lib/ui/screens/checkout/checkout_screen.dart,lib/ui/screens/policies_screen.dart,lib/ui/shell/app_shell.dart,lib/ui/shell/bottom_nav.dart,tool/rebrand.dart,pubspec.yaml,ios/Runner.xcodeproj/project.pbxproj(privacy manifest added to the Runner target) - Removed:
tool/package_release.dart(author-only) - Android build files:
android/gradle/wrapper/gradle-wrapper.properties(Gradle 9.5.0) andandroid/settings.gradle.kts(Android Gradle Plugin 9.3.1, Kotlin 2.4.20). Without them Flutter 3.50 stops with "Gradle version is lower than Flutter's minimum supported version". - Your own Dart files (screens or widgets you added): one command rewrites the old imports for you. In the
project folder:
It only changesdart run tool/migrate_imports.dart --check # lists the files it would change dart run tool/migrate_imports.dart # rewrites them (lib/, test/, integration_test/, addons/)package:flutter/material.dart→package:material_ui/material_ui.dartandpackage:flutter/cupertino.dart→package:cupertino_ui/cupertino_ui.dart(same classes, new import) and checks thatpubspec.yamllists both packages. To migrate your old project in place, copytool/migrate_imports.dartfrom 1.0.1 into it first. Thenflutter pub getandflutter analyze. Every file underlib/andtest/has this new import.
- New:
- Build and test a release on a phone before you publish the update to the stores.
1.0.0
First release.
- Native Shopify storefront for Android and iOS from one Flutter codebase.
- Home: banner carousel with translatable text, New Arrivals, collection rows from the store menu.
- Collections, product lists with paging, search with instant results.
- Product page: gallery with zoom, variant options (sold-out aware), description, related products, availability check, call for price, optional tax labels.
- Sale prices: products with a Shopify compare-at price show a "Sale" badge and the old price struck through
(product page: per variant, with the discount in percent). Badge color:
salein the brand colors. - Cart, wishlist, notifications; Shopify checkout inside the app with order confirmation.
- Customer accounts (Shopify Customer Account API): sign in, profile, orders, addresses; signed-in checkout.
- Glass design, light/dark mode, multiple languages with right-to-left support (English and Arabic included).
- Works offline from cache. One configuration file;
tool/rebrand.dartfor the native projects.
Licenses
ShopNative
The ShopNative source code is licensed to you under the CodeCanyon / Envato Market licence you purchased (Regular or Extended). See https://codecanyon.net/licenses/standard.
Brand assets
The "Luma Store" logo, symbol and app icon in assets/brand/ were created for the ShopNative demo and may be
replaced freely. "Luma Store" is a fictional demo brand.
Demo photos
The banner, collection and product photos seen in the demo store and screenshots are from Pexels (Pexels License) and are
not included in this download (only small screenshots of the app in docs/images/). Use your own images. Credits are in docs/DEMO_CREDITS.md.
Open-source packages
All packages used by the app have permissive licences (BSD, MIT, Apache 2.0). Their notices are shown in the app under Settings → Open-source licenses (Flutter collects them automatically).
Direct dependencies:
| Package | Version | Licence | Published by / source |
|---|---|---|---|
| crypto | 3.0.7 | BSD-3-Clause | Dart team, github.com/dart-lang/core |
| flutter | SDK | BSD-3-Clause | Flutter team (Google), github.com/flutter/flutter |
| flutter_localizations | SDK | BSD-3-Clause | Flutter team, part of the SDK |
| material_ui | 1.11.1 | BSD-3-Clause | Flutter team, github.com/flutter/packages (packages/material_ui) |
| cupertino_ui | 1.1.7 | BSD-3-Clause | Flutter team, github.com/flutter/packages (packages/cupertino_ui) |
| flutter_secure_storage | 11.2.0 | BSD-3-Clause | pub.dev/packages/flutter_secure_storage |
| flutter_web_auth_2 | 5.1.0 | MIT | pub.dev/packages/flutter_web_auth_2 |
| http | 1.6.0 | BSD-3-Clause | Dart team, github.com/dart-lang/http |
| path_provider | 2.1.6 | BSD-3-Clause | Flutter team, github.com/flutter/packages |
| shared_preferences | 2.5.6 | BSD-3-Clause | Flutter team, github.com/flutter/packages |
| url_launcher | 6.3.3 | BSD-3-Clause | Flutter team, github.com/flutter/packages |
| webview_flutter | 4.14.1 | BSD-3-Clause | Flutter team, github.com/flutter/packages |
About material_ui and cupertino_ui: they are the Flutter team's own packages, not third-party code and not
written by us. Since Flutter 3.50 the Material and Cupertino widgets are published from the official
flutter/packages repository instead of inside the SDK (the SDK's material.dart / cupertino.dart are deprecated).
Their licence is BSD 3-Clause, "Copyright 2013 The Flutter Authors", the same as Flutter itself: use and
redistribution in commercial products are allowed as long as the copyright notice is kept, and Flutter adds it to
the app's licence screen automatically.
Including transitive packages: BSD-3-Clause ×68, MIT ×4, Apache-2.0 ×3.
Icons: Material Icons (Apache 2.0), bundled with Flutter. Fonts: the device's system font (no fonts bundled).
Item preview images
The CodeCanyon preview banners (not part of this download) use the Google Fonts Jost and Inter (SIL Open Font License 1.1) and Lucide style icons (ISC License).
Photo credits: Luma Store demo images
All photos are from Pexels and used under the Pexels License (free for commercial use; attribution not required but given here). License: https://www.pexels.com/license/
Images were cropped, resized and colour-graded for the Luma Store demo.
| Used for | Photographer | Source |
|---|---|---|
| 1-new-arrivals (banner + collection image) | cottonbro studio | https://www.pexels.com/photo/woman-standing-by-the-water-5263307/ |
| 2-women (banner + collection image) | MART PRODUCTION | https://www.pexels.com/photo/studio-shoot-of-a-woman-with-prosthetic-leg-8437008/ |
| 3-men (banner + collection image) | cottonbro studio | https://www.pexels.com/photo/a-man-wearing-a-white-shirt-over-a-turtleneck-7764067/ |
| 4-accessories (collection image) | Marina M | https://www.pexels.com/photo/woven-bags-on-the-table-8356229/ |
| 4-accessories (banner) | Minne Yaël Photographie | https://www.pexels.com/photo/close-up-of-a-brown-hat-lying-on-beige-fabric-17068555/ |
Product photos
The product photos in the demo store are also from Pexels (Pexels License) and were cropped and retouched for the demo (backgrounds, framing). Like the photos above, they are loaded from the demo store and are not part of this download.
Preview images
The CodeCanyon preview banners use the Google Fonts Jost and Inter (SIL Open Font License 1.1) and
Lucide-style icons (ISC License). See LICENSES.md.
Using these photos
- The photos are loaded from the demo store; the image files are not part of this download. Use your own images for your store.
- The Pexels License allows commercial use and modification, but not selling or redistributing unaltered copies of the photos.
Support
Most questions are answered in this documentation; see Troubleshooting first.
If you need help, contact us with your purchase code, your Flutter version (flutter --version) and a screenshot or
the error message:
- Email: hello@devapptics.com
- Phone: +1 (213) 658-4875
- WhatsApp: +1 (213) 658-4875
- Or use the comments / support tab on the CodeCanyon item page.
Support covers questions about the item, bugs, and help with the setup described here. Custom changes and installation services are not part of item support.
Installation and publishing service (paid, optional)
If you prefer, we can set up and publish the app for you. This is a separate paid service, quoted per project; it is not included in the item price.
What we do
- Connect the app to your Shopify store and set up the Headless channel and customer accounts
- Apply your app name, package name, logo, app icon, colours and languages
- Build the release versions for Android and iOS
- Prepare the store listings and submit the app to Google Play and the App Store
What you provide
- Your purchase code
- Access to your Shopify store as a collaborator or staff account (no passwords needed)
- App name, logo (PNG or SVG), app icon (1024 × 1024 px) and brand colours
- Your own Google Play Console account (one-time Google fee), with us invited as a user
- Your own Apple Developer Program account (yearly Apple fee), with us invited in App Store Connect
- Store listing texts: short and full description, support email and your privacy policy URL
The developer accounts stay in your name, so you keep full ownership of your apps. Store review times are set by Google and Apple.
To request a quote, email hello@devapptics.com with the subject "ShopNative setup" and your purchase code.