Documentation

Mobile App Configuration

Point the app at your SaleX server, then make it yours: colors, name, package identifier and launcher icon.

On this page
File locations Paths below are relative to the root of the Flutter project. If a file is not exactly where this page says, use your editor's file search (Ctrl + P on Windows/Linux, Cmd + P on macOS) for the file name.

Set the base URL

The base URL tells the app where your SaleX server lives. Open:

lib/utils/app_constant.dart

Update the value:

static const String baseUrl = "https://yourdomain.com";
Use your live HTTPS domain Enter only the domain, with no trailing slash and no page path. Correct: https://yourdomain.com. Do not use localhost for a build you will install on a phone, because a phone cannot reach your computer's localhost.

Rebuild the app after changing the base URL.

βœ“ Success looks like: the app opens and loads products from your store.

Theme (light and dark)

The app supports light and dark mode. Colors, text styles and card styles are set in the theme files:

lib/
└── theme/
    β”œβ”€β”€ light_theme.dart
    └── dark_theme.dart

Open the file for the mode you want to change and edit the colors and styles to match your brand. Light theme applies in normal mode and dark theme applies when the phone is in dark mode.

Check both modes After changing colors, run the app and look at it in both light and dark mode so text stays readable on every background.
Light theme file
Light theme file
Dark theme file
Dark theme file

Apply the changes:

flutter clean
flutter pub get
flutter run

Change the app name

The name appears in three places. Change all three so they match.

  1. In the Flutter code

    Edit appName in lib/utils/app_constant.dart.

    Changing appName in the constants file
    Changing appName in the constants file
  2. On Android

    Update the android:label value in android/app/src/main/AndroidManifest.xml.

    Application label in AndroidManifest.xml
    Application label in AndroidManifest.xml
  3. On iOS

    Update the CFBundleDisplayName / CFBundleName values in ios/Runner/Info.plist.

    App name in Info.plist
    App name in Info.plist

Change the package name

Every Android app has a unique package name (for example com.yourcompany.salex). Change it before you publish, because it cannot be changed after the app is live on Google Play.

Open android/app/build.gradle and find the namespace entry inside the android block:

android {
    namespace = "com.yourcompany.salex"
}

Then use your IDE's global find-and-replace across the whole project to replace the old package name with the new one.

Global search and replace of the package name
Global search and replace of the package name

Files to review afterwards

Then clean and rebuild:

flutter clean
flutter pub get
flutter run
Match Firebase The package name you choose here must be the same one you register in Firebase. See Firebase Configuration. Changing it later means re-registering the app and replacing google-services.json.

Change the app icon

Generate every icon size you need from one image with a free tool such as appicon.co. Upload a square logo (1024 Γ— 1024 px works well) and download the generated package.

  1. Android

    Replace all mipmap-* folders inside android/app/src/main/res with the generated ones.

  2. iOS

    Replace the AppIcon.appiconset contents inside ios/Runner/Assets.xcassets with the generated files.

Keep the generated folder structure and file names unchanged. Apply the change:

flutter clean
flutter pub get
flutter run