Connect the apps to your server
Each app reads your server’s address from one file: lib/app_config.dart. Set it once per app
before you run or build it.
| App | File |
|---|---|
| Customer | apps/customer/lib/app_config.dart |
| Seller | apps/seller/lib/app_config.dart |
| Rider | apps/delivery/lib/app_config.dart |
Set the address
Section titled “Set the address”- Open the app’s
lib/app_config.dartin any editor (Android Studio, VS Code …). - Put your address between the quotes on the
baseUrlline:Use the same address as your website and admin — the Site URL you entered in the installer — withapps/customer/lib/app_config.dart static const String baseUrl = 'https://yourdomain.com';https://and no trailing slash. - Save, then do the same in the other two apps.
Check the connection
Section titled “Check the connection”- Run the customer app (
flutter runinapps/customer). - The home screen should show your store name and brand colour (Settings → Brand & business) — the app downloads them from your server when it starts.
- If it shows a connection error, open
https://yourdomain.com/api/bootstrapin the phone’s browser: it should show text starting with{. If it doesn’t, the server or HTTPS isn’t reachable from the phone.
HTTPS only
Section titled “HTTPS only”Release builds only talk to https:// servers. Plain http:// works in debug builds, for testing
against a server on your own computer — leave baseUrl empty and the app uses 127.0.0.1:8001
(or 10.0.2.2:8001 from the Android emulator).
Changing servers later
Section titled “Changing servers later”Edit baseUrl, then build and publish a new version of each app. Phones keep using the address
their installed version was built with.