Introduction

The DayOneMart Deliveryman App is a dedicated Flutter mobile application for delivery personnel. It enables deliverymen to receive and manage assigned orders, navigate to delivery locations via Google Maps, update order statuses in real-time, communicate with admin via live chat, and manage their account β€” all from a single app on Android and iOS.

The app connects to the OneMart Admin & Web backend exclusively via the REST API at /api/v1/delivery-man/*. Push notifications are delivered through Firebase Cloud Messaging.

Technology Stack

LayerPackage / TechnologyVersion
FrameworkFlutterSDK (stable)
LanguageDart^3.9.0
State Managementflutter_bloc + BLoC^9.1 / ^9.2
Navigationgo_router + go_transitions^17.2 / ^0.8
Dependency Injectionget_it + injectable^9.2 / ^2.7
Code Generationfreezed + json_serializable^3.2 / ^6.13
Networkinghttp + connectivity_plus^1.6 / ^7.1
FirebaseCore, Messaging, Crashlytics, Analytics^4.7 / ^16.2
Maps & Locationgoogle_maps_flutter + geolocator + location^2.17 / ^14.0 / ^8.0
Permissionspermission_handler^12.0
Imagescached_network_image + image_picker^3.4 / ^1.2
Videovideo_player + chewie^2.11 / ^1.13
Notificationsflutter_local_notifications^21.0
Localizationflutter_localizations + intlSDK / ^0.20
Chatemoji_keyboard_flutter^1.7
Error Trackingfirebase_crashlytics + catcher_2^5.2 / ^2.1
Storageshared_preferences^2.5
OTPotp_autofill^4.1
UI Utilitiesshimmer_animation, skeletonizer, flutter_svg, animated_digit, sliver_tools, google_fontsLatest

Architecture Overview

The deliveryman app follows the same feature-first clean architecture pattern as the customer app:

App Features

πŸš€
Splash & Connectivity Animated splash screen with network connectivity check
πŸ”
Authentication Email/phone login, OTP verification, forgot password, password reset
🏠
Home / Dashboard Overview of assigned orders, delivery stats, and earnings summary
πŸ“¦
Order Management View assigned orders, accept/reject, update status through delivery lifecycle
πŸ“
Delivery Navigation Google Maps route from pickup to delivery with real-time tracking
❌
Cancellation Flow Cancel delivery with reason selection and admin notification
βœ…
Delivery Confirmation Mark orders as delivered with result confirmation screen
πŸ’¬
Live Chat Chat with admin support, emoji keyboard, media file sharing
πŸ””
Notifications Push notifications (Firebase), local notifications, in-app notification list
πŸ‘€
Account & Profile View/edit profile, change password, delete account
βš™οΈ
Settings Language, theme, notification preferences, password setup
πŸ“ž
Contact Us Contact support with form submission
πŸ“„
Terms & Conditions View terms of service within the app
πŸ“Ž
File Viewer View images and media files shared in chat
🌐
Multi-language English, Spanish, Arabic, Hindi, Bangla
πŸŒ™
Dark / Light Theme System-aware theme with manual toggle

Key Screens (Annotated)

Capture these core screens on a device or emulator and annotate the numbered areas below with arrows or callouts before resubmission. Save each image with the exact file name shown.

Deliveryman App Dashboard β€” greeting with orders to deliver, delivery KPI cards, recent orders, and bottom navigation 1 2 3 4

Key areas of this screen

  1. Greeting & See Orders β€” a summary of how many orders are waiting, with a shortcut to the order list; the bell shows new notifications.
  2. Delivery KPI cards β€” Pending, Ongoing, Completed, and Cancelled delivery counts.
  3. Recent orders β€” the latest assigned orders with status, amount, payment type, and View Details.
  4. Bottom navigation β€” Home, Orders, Chatting, and Account tabs.
Dashboard. The deliveryman's home base after login. Numbered markers highlight the four key areas.
Deliveryman App Orders β€” status filter tabs, order cards with items and amount, View Details, and bottom navigation 1 2 3 4

Key areas of this screen

  1. Status filter tabs β€” switch between On the Way, Ready to Handover, Confirmed, and Delivered.
  2. Order card header β€” order number, item count, and date/time.
  3. Amount & View Details β€” the order total and the button that opens the full order (customer, address, items, and status actions).
  4. Bottom navigation β€” Home, Orders, Chatting, and Account tabs.
Orders. The rider's assigned deliveries, filterable by stage; open any order to accept, navigate, and complete it. Numbered markers highlight the four key areas.

Prerequisites

Development Machine Requirements

ToolMinimum VersionNotes
Flutter SDK3.x (stable channel)Run flutter --version to check
Dart SDK^3.9.0Bundled with Flutter
Android StudioHedgehog (2023.1+)Required for Android builds
Xcode15+macOS only β€” required for iOS builds
CocoaPodsLatestmacOS only β€” sudo gem install cocoapods
Java JDK17For Android Gradle builds

External Services Required

Flutter Environment Check

flutter doctor -v

Resolve all errors before proceeding. Warnings for unneeded platforms (e.g. Linux, Windows) can be ignored if you only target Android/iOS.

Project Structure

lib/
β”œβ”€β”€ main.dart                       ← App entry point + Firebase init
β”œβ”€β”€ firebase_options.dart           ← Generated by FlutterFire CLI
β”‚
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ route/
β”‚   β”‚   └── route_config.dart       ← GoRouter route definitions
β”‚   β”œβ”€β”€ theme/                      ← App theme (colors, typography)
β”‚   └── util/
β”‚       β”œβ”€β”€ app_constants.dart      ← API base URL + all endpoints
β”‚       β”œβ”€β”€ assets.gen.dart         ← Generated asset references
β”‚       β”œβ”€β”€ dimensions.dart         ← Spacing / size constants
β”‚       └── styles.dart             ← Reusable TextStyles
β”‚
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   └── api/                    ← Base HTTP client, interceptors
β”‚   β”œβ”€β”€ model/
β”‚   β”‚   └── response/              ← Generic response wrappers
β”‚   β”œβ”€β”€ dependency_injection/       ← GetIt setup + injectable config
β”‚   β”œβ”€β”€ helper/                     ← Notification helper, extensions, utils
β”‚   └── catcher_logs/               ← Catcher_2 error reporting config
β”‚
β”œβ”€β”€ features/                       ← Feature-first modules
β”‚   β”œβ”€β”€ splash/                     ← Splash screen + connectivity check
β”‚   β”œβ”€β”€ login/                      ← Auth (login, OTP, forgot password, set password)
β”‚   β”œβ”€β”€ home/                       ← Home screen + dashboard BLoC
β”‚   β”œβ”€β”€ dashboard/                  ← Bottom nav shell + tab management
β”‚   β”œβ”€β”€ order/                      ← Order list, details, delivery location, cancel, result
β”‚   β”œβ”€β”€ chat/                       ← Chat list, conversations, message sending
β”‚   β”œβ”€β”€ account/                    ← Profile, edit profile, change password, delete account
β”‚   β”œβ”€β”€ notification/               ← Notification list + management
β”‚   β”œβ”€β”€ settings/                   ← Settings screen, language, theme, password setup
β”‚   β”œβ”€β”€ contact_us/                 ← Contact support form
β”‚   β”œβ”€β”€ terms_and_condition/        ← Terms of service viewer
β”‚   β”œβ”€β”€ file_viewer/                ← Image/media file viewer
β”‚   β”œβ”€β”€ html/                       ← Generic HTML content renderer
β”‚   └── common/                     ← Shared widgets, theme BLoC
β”‚
β”œβ”€β”€ l10n/
β”‚   β”œβ”€β”€ arb/                        ← ARB localization source files
β”‚   β”‚   β”œβ”€β”€ app_en.arb
β”‚   β”‚   β”œβ”€β”€ app_es.arb
β”‚   β”‚   β”œβ”€β”€ app_ar.arb
β”‚   β”‚   β”œβ”€β”€ app_hi.arb
β”‚   β”‚   └── app_bn.arb
β”‚   └── gen/                        ← Generated localization classes
β”‚       └── app_localizations.dart
β”‚
assets/
β”œβ”€β”€ images/                         ← PNG / JPG images
β”‚   β”œβ”€β”€ svg/                        ← SVG icons
β”‚   β”‚   └── flags/                  ← Country flag SVGs
β”‚   └── gif/                        ← Animated GIFs

Feature Module Structure

Each feature follows the same internal layout:

features/order/
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ models/             ← Freezed + JSON serializable DTOs
β”‚   └── repositories/       ← Repository implementation (API calls)
β”œβ”€β”€ domain/
β”‚   └── services/           ← Domain service / repository interface
└── presentation/
    β”œβ”€β”€ bloc/               ← BLoC / Cubit + States + Events
    β”‚   β”œβ”€β”€ order/          ← Order list & detail BLoC
    β”‚   └── order_delivery_location/  ← Map tracking BLoC
    β”œβ”€β”€ screens/            ← Full-screen widgets
    β”œβ”€β”€ widgets/            ← Reusable widgets for this feature
    └── utils/              ← Feature-specific utilities

Navigation Structure

The app uses a ShellRoute for the main dashboard with a bottom navigation bar housing four tabs:

TabRouteScreen
Home/homeHomeScreen β€” dashboard with stats
Orders/orderOrdersScreen β€” active & completed orders
Chat/chatChatScreen β€” chat with admin
Account/accountAccountScreen β€” profile & settings

Installation Guide (Step-by-Step)

Follow these steps in order to go from the downloaded ZIP to the app running on a device. Steps 6–7 point to their own detailed sections further down this page.

Before You Start β€” Checklist

  1. Extract the project Unzip the package and open the Delivery Man App folder in your editor (VS Code / Android Studio). All commands below are run from this folder.
  2. Verify your Flutter environment
    flutter doctor -v
    
    Fix any reported errors (missing Android SDK, unaccepted licenses, no Xcode) before continuing.
  3. Install dependencies
    flutter pub get
    
  4. Generate code The project relies on code generation β€” it will not compile without this step:
    dart run build_runner build --delete-conflicting-outputs
    flutter gen-l10n
    
  5. Point the app at your backend Open lib/config/util/app_constants.dart and set baseUrl to your deployed Admin & Web instance (always https:// in production). Also set your currency symbol β€” see Configuration.
  6. Connect Firebase Register the Android and iOS apps in your Firebase project, then place google-services.json in android/app/ and GoogleService-Info.plist in ios/Runner/ (or run flutterfire configure). Full walkthrough: Firebase Setup.
  7. Add your Google Maps API key Copy secrets.xml.example to android/app/src/main/res/values/secrets.xml and fill in the key; add the iOS key to Info.plist. Full walkthrough: Google Maps Setup.
  8. Run the app
    flutter devices                  # list connected devices
    flutter run -d <device-id>      # debug build on a device
    
    Log in with a deliveryman account created in the Admin Panel (Users β†’ Deliverymen β†’ Create New), assign that deliveryman a test order, and confirm it appears on the app dashboard.
  9. Rebrand and release Rename the app, set your bundle ID, icon, splash, and colors using the Branding & Customization Guide, then produce store builds following Build & Release.

Configuration

API Base URL

Open lib/config/util/app_constants.dart and update the baseUrl to point to your deployed OneMart Admin & Web instance:

// lib/config/util/app_constants.dart

class AppConstants {
  static const String baseUrl = 'https://yourdomain.com';
  // ...
}
⚠️
This is critical. The default baseUrl points to the demo server. You MUST change it to your own backend URL before building for production. Failure to do so will cause the app to send requests to the wrong server.

App Name & Bundle ID

PlatformFileKey
Android android/app/build.gradle applicationId (default: com.dayonesoft.onemartdeliveryman)
Android android/app/src/main/AndroidManifest.xml android:label
iOS ios/Runner/Info.plist CFBundleName, CFBundleIdentifier

Currency Symbol

The default currency symbol is configured in app_constants.dart:

static String currencySymbol = "ΰ§³";           // Change to your currency
static String currencySymbolPosition = 'left'; // 'left' or 'right'
Deliveryman App in-app Settings screen β€” Language, Setup Password, and Notification / Location / Microphone permission toggles

Annotate on the Settings screen

  1. Language selector β€” switch the app's display language.
  2. Set up password β€” for accounts created via OTP login.
  3. Permission toggles β€” notification, location, and microphone access.
  4. Theme toggle β€” dark / light mode preference.
Deliveryman App β†’ Settings. The in-app Settings screen lets the rider switch language, set up a password, and toggle notification, location, and microphone permissions. The backend URL and currency symbol are set in lib/config/util/app_constants.dart (see above).

Firebase Setup

  1. Create or select your Firebase project Go to the Firebase Console. You can reuse the same Firebase project used for the Admin & Web backend and Customer App.
  2. Register Android app Use the package name com.dayonesoft.onemartdeliveryman. Download google-services.json and place it at:
    android/app/google-services.json
    
  3. Register iOS app Use the bundle ID com.dayonesoft.onemartdeliveryman. Download GoogleService-Info.plist and add it to Xcode at:
    ios/Runner/GoogleService-Info.plist
    
  4. Generate firebase_options.dart
    # Install FlutterFire CLI (if not already installed)
    dart pub global activate flutterfire_cli
    
    # Login to Firebase
    firebase login
    
    # Generate firebase_options.dart
    flutterfire configure
    
    This creates/updates lib/firebase_options.dart automatically.
  5. Enable Firebase services In the Firebase Console, enable:
    • Cloud Messaging (FCM) β€” required for push notifications
    • Crashlytics β€” automatic crash reporting
    • Analytics β€” usage analytics

FCM Topics

The app subscribes to the following FCM topics on launch:

deliveryman-group    // All deliveryman-specific broadcast messages
all-general          // Platform-wide announcements
ℹ️
Ensure the FCM Server Key is configured in the Admin Panel under Settings β†’ Firebase Setup so that the backend can send notifications to these topics when new orders are assigned.

Google Maps Setup

Step 1 β€” Enable APIs in Google Cloud Console

Step 2 β€” Configure Android (secrets.xml)

Copy the template and fill in your Google Maps API key:

cp secrets.xml.example android/app/src/main/res/values/secrets.xml
<!-- android/app/src/main/res/values/secrets.xml -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="google_maps_api_key">YOUR_GOOGLE_MAPS_API_KEY</string>
</resources>
⚠️
secrets.xml is gitignored and must never be committed. Keep your API keys safe and out of version control.

Step 3 β€” Configure iOS

Add the Google Maps API key to ios/Runner/Info.plist:

<key>GoogleMapsApiKey</key>
<string>YOUR_GOOGLE_MAPS_API_KEY</string>

Location Permissions

The app uses geolocator, location, and permission_handler to request and manage location permissions. On first launch, the user is prompted to grant location access, which is required for delivery navigation. The required permission entries are already included in the AndroidManifest.xml and Info.plist.

Localization

The app supports 5 languages out of the box:

LanguageCodeARB File
Englishenlib/l10n/arb/app_en.arb
Spanisheslib/l10n/arb/app_es.arb
Arabicarlib/l10n/arb/app_ar.arb
Hindihilib/l10n/arb/app_hi.arb
Banglabnlib/l10n/arb/app_bn.arb

Localization Config

The localization configuration is defined in l10n.yaml:

arb-dir: lib/l10n/arb
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
output-dir: lib/l10n/gen
nullable-getter: false

Adding a New Language

  1. Create a new ARB file, e.g. lib/l10n/arb/app_fr.arb. Copy the structure from app_en.arb and translate all strings.
  2. Add the language to the languages list in app_constants.dart:
    LanguageModel(code: 'fr', name: 'French', nativeName: 'FranΓ§ais'),
    
  3. Regenerate localization files:
    flutter gen-l10n
    
ℹ️
Arabic (ar) is an RTL language. Flutter handles layout mirroring automatically when the ar locale is active. Untranslated strings are tracked in untranslated.txt at the project root.

Mobile App Build Requirements

A store-ready build of the deliveryman app requires platform-specific code signing on both Android and iOS. This section covers Android keystore generation and iOS code signing from start to finish. Set these up once β€” the signing material is reused for every future release and update.

PlatformYou needWhere it is used
AndroidAn upload/release keystore (.jks) + key.propertiesSigns the .aab / .apk for Google Play
iOSApple Developer Program membership, a Distribution certificate, an App ID, and a provisioning profileSigns the .ipa for the App Store / TestFlight

Android β€” Keystore Generation

Google Play requires every release build to be digitally signed with a keystore you own. Generate one with the JDK's keytool utility:

keytool -genkey -v \
  -keystore upload-keystore.jks \
  -keyalg RSA -keysize 2048 -validity 10000 \
  -alias upload

You will be prompted for a keystore password, a key password, and your organisation details. This produces an upload-keystore.jks file. Move it into the Android app module (for example android/app/upload-keystore.jks), then create android/key.properties so Gradle can locate and use it:

# android/key.properties
storePassword=<your-store-password>
keyPassword=<your-key-password>
keyAlias=upload
storeFile=upload-keystore.jks

The Android app module is already configured to read key.properties and apply the release signing config automatically, so no Gradle edits are required. Once the file is in place, flutter build appbundle --release produces a signed, upload-ready bundle.

⚠️
Store the .jks keystore and its passwords somewhere safe and backed up, and keep key.properties out of version control. Losing the keystore means you can never publish an update to the same Google Play listing again.

iOS β€” Code Signing

iOS builds must be signed with credentials issued by Apple. A paid Apple Developer Program membership is required before you can create a distributable build.

  1. Register an App ID (Bundle Identifier) In the Apple Developer portal β†’ Certificates, Identifiers & Profiles β†’ Identifiers, register a unique bundle ID (e.g. com.yourcompany.onemartdeliveryman) and enable the Push Notifications capability.
  2. Create a Distribution certificate Under Certificates, create an Apple Distribution certificate and install it into your Mac's login Keychain. This identity signs release builds.
  3. Create a provisioning profile Create an App Store distribution provisioning profile that links your App ID to the distribution certificate, then download and double-click it to install.
  4. Configure signing in Xcode Open ios/Runner.xcworkspace β†’ select the Runner target β†’ Signing & Capabilities. Set your Team and the Bundle Identifier to match the App ID above. Automatically manage signing is recommended for most users.
  5. Create the app record in App Store Connect In App Store Connect, create a new app using the same bundle ID so you can upload builds to TestFlight and the App Store.
ℹ️
A Mac with Xcode is required to build and sign iOS apps. Android keystore generation works on any platform (Windows, macOS, or Linux) with the JDK installed. Concrete build commands for both platforms follow in the next section.

Build & Release

Android β€” Signing Setup

  1. Create a release keystore:
    keytool -genkey -v -keystore android/app/upload-keystore.jks \
      -keyalg RSA -keysize 2048 -validity 10000 -alias upload
    
  2. Create android/key.properties:
    storePassword=<your-store-password>
    keyPassword=<your-key-password>
    keyAlias=upload
    storeFile=upload-keystore.jks
    
⚠️
Keep the keystore (.jks) and key.properties file safe. You need them for every future app update on Google Play. Losing the keystore means you cannot publish updates to the same listing.

Android β€” Debug APK

flutter build apk --debug
# Output: build/app/outputs/flutter-apk/app-debug.apk

Android β€” Release APK

flutter build apk --release --obfuscate --split-debug-info=build/app/outputs/symbols
# Output: build/app/outputs/flutter-apk/app-release.apk

Android β€” App Bundle (Google Play)

flutter build appbundle --release --obfuscate --split-debug-info=build/app/outputs/symbols
# Output: build/app/outputs/bundle/release/app-release.aab
ℹ️
--obfuscate shrinks and obfuscates Dart code for production. --split-debug-info saves debug symbols needed for deobfuscating crash reports in Firebase Crashlytics and Google Play Console. Always keep the symbols directory alongside your release.

iOS β€” Release (App Store)

flutter build ipa --release --obfuscate --split-debug-info=build/ios/symbols

Then open build/ios/ipa in Xcode Organizer or use Transporter to upload to App Store Connect.

Publishing to Google Play β€” Step by Step

With the signed .aab from the previous section, here is the complete path from build to a live Google Play listing:

  1. Create a Google Play developer account Register at play.google.com/console (one-time $25 fee). Identity verification can take a day or two for new accounts.
  2. Create the app In the Play Console: All apps β†’ Create app. Enter the app name, default language, select App (not Game) and Free, and accept the declarations.
  3. Complete the "Set up your app" checklist On the app's Dashboard, work through every task before your first release: privacy policy URL, App access (provide a working demo deliveryman login so Google's reviewers can sign in), Ads declaration, Content rating, Target audience, and the Data safety form β€” declare that the app collects the rider's location, name, email, and phone number for delivery operations.
  4. Build the signed bundle Confirm android/key.properties is in place, then run flutter build appbundle --release. The signed bundle is written to build/app/outputs/bundle/release/app-release.aab.
  5. Test with an Internal testing release first Go to Testing β†’ Internal testing β†’ Create new release, upload the .aab, add your email as a tester, and install the app on a real device via the opt-in link. Verify rider login, going online, receiving an assigned order, status updates, and map navigation against your live backend before going public.
  6. Roll out to Production Once the internal build works, go to Production β†’ Create new release (or promote the internal release), add release notes, review, and Start rollout.
⚠️
Location permission declaration. Delivery apps that request location access trigger an extra Sensitive app permissions declaration in the Play Console. Fill in the location-permissions form honestly (location is used to track active deliveries) and, if Google asks for one, provide a short screen-recording showing the in-app feature that uses location. Skipping this declaration is a common cause of Play Store rejections for deliveryman apps.

Publishing to the App Store β€” Step by Step

  1. Prerequisites Complete the iOS code-signing setup above: Apple Developer membership, App ID, signing configured in Xcode, and the app record created in App Store Connect.
  2. Build the signed archive Run flutter build ipa --release. The signed .ipa is written to build/ios/ipa/.
  3. Upload the build Open Apple's free Transporter app (Mac App Store), sign in with your Apple ID, drag the .ipa in, and click Deliver. (Alternative: open the archive in Xcode Organizer and click Distribute App.)
  4. Wait for processing, then test via TestFlight In App Store Connect the build appears under TestFlight after 15–60 minutes of processing. Install it on a real device with the TestFlight app and verify rider login, order flow, and push notifications.
  5. Complete the App Store listing In App Store Connect fill in: screenshots for the required device sizes, description, keywords, support URL, privacy policy URL, and the App Privacy questionnaire (declare location, contact info, and identifiers collected for delivery operations).
  6. Submit for review Select the build, add review notes with a working demo deliveryman account (Apple rejects apps it cannot log in to), and submit. Reviews typically complete within 24–48 hours.

Versioning App Updates

The app version lives in pubspec.yaml:

# pubspec.yaml
version: 3.0.0+30
#        β”‚     └─ build number β†’ Android versionCode / iOS build number
#        └─────── display version β†’ Android versionName / iOS version

Every upload to Google Play or App Store Connect must have a higher build number (the part after +) than the previous upload. Bump it, rebuild, and re-upload β€” e.g. 3.0.0+30 β†’ 3.0.1+31.

Common Build & Signing Errors

ErrorCauseFix
Keystore was tampered with, or password was incorrect Wrong storePassword / keyPassword in key.properties Re-check both passwords; they must match what you entered in keytool.
Release build is signed with debug keys / Play rejects the upload android/key.properties missing, or storeFile path wrong The storeFile path is relative to android/app/. Place the .jks at android/app/upload-keystore.jks and use storeFile=upload-keystore.jks.
Android sdkmanager licences not accepted SDK licences never accepted on this machine Run flutter doctor --android-licenses and accept all.
CocoaPods errors during iOS build Stale or missing pods cd ios && pod repo update && pod install, then rebuild.
No signing certificate "iOS Distribution" found Distribution certificate not installed in this Mac's Keychain Enable Automatically manage signing with your Team selected in Xcode, or download and double-click your distribution certificate.
Version code X has already been used (Play Console) Uploading a build with the same or lower build number Increase the +N build number in pubspec.yaml and rebuild.

API Integration

All API endpoints are declared in lib/config/util/app_constants.dart. The HTTP client in lib/core/data/api/ prepends the baseUrl and handles JWT token attachment, refresh, and error handling automatically.

πŸ”Œ
The full endpoint-by-endpoint technical reference β€” methods, paths, auth requirements, response envelope, and third-party integration points β€” is on the dedicated API Reference page.

Authentication Flow

POST /api/v1/delivery-man/auth/login               ← Email/phone + password
POST /api/v1/delivery-man/auth/send-login-otp       ← Request login OTP
POST /api/v1/delivery-man/auth/verify-login-otp     ← Verify OTP β†’ returns JWT
POST /api/v1/delivery-man/auth/forgot-password       ← Initiate password reset
POST /api/v1/delivery-man/auth/verify-otp            ← Verify reset OTP
POST /api/v1/delivery-man/auth/reset-password        ← Set new password
POST /api/v1/delivery-man/auth/refresh               ← Refresh JWT token
POST /api/v1/delivery-man/auth/logout                ← Invalidate session

Core Endpoints

FeatureMethodEndpoint
App ConfigGET/api/v1/delivery-man/config
DashboardGET/api/v1/delivery-man/dashboard
OrdersGET/PUT/api/v1/delivery-man/orders
Map DirectionGET/api/v1/delivery-man/config/map-direction
ProfileGET/PUT/api/v1/delivery-man/profile
FCM TokenPUT/api/v1/delivery-man/profile/fcm-token
Change PasswordPUT/api/v1/delivery-man/profile/change-password
Delete AccountDELETE/api/v1/delivery-man/profile/delete-account
SettingsGET/PUT/api/v1/delivery-man/profile/settings
ChatGET/POST/api/v1/delivery-man/chats
NotificationsGET/PUT/DELETE/api/v1/delivery-man/notifications
TermsGET/api/v1/delivery-man/config/terms
Support / ContactGET/api/v1/delivery-man/config/support

Request Headers

Authorization: Bearer {jwt_token}
Accept: application/json
Content-Type: application/json
X-localization: en         ← Current language code

Troubleshooting

"google-services.json not found"

Ensure you have downloaded the file from Firebase Console and placed it at:

android/app/google-services.json

"Cannot resolve symbol '@string/google_maps_api_key'"

Create secrets.xml from the template:

cp secrets.xml.example android/app/src/main/res/values/secrets.xml
# Then edit secrets.xml and add your real API key

Firebase Initialization Failed

dart pub global activate flutterfire_cli
flutterfire configure

Build Runner Conflicts

dart run build_runner clean
dart run build_runner build --delete-conflicting-outputs

Gradle Build Failures (Android)

CocoaPods Issues (iOS)

cd ios
pod deintegrate
pod install --repo-update
cd ..
flutter build ios

Google Maps Not Showing

Push Notifications Not Received

Location Permission Denied

General Reset

flutter clean
flutter pub get
dart run build_runner build --delete-conflicting-outputs
flutter gen-l10n
flutter run

FAQ & Environment-Specific Issues

Common environment-specific hurdles when setting up and building the Flutter app.

API requests time out or fail to connect

Gradle / Android build fails on a fresh machine

CocoaPods / iOS build fails

cd ios
pod repo update
pod install --repo-update
cd ..
flutter build ios

On Apple Silicon, if pods fail to install, retry under Rosetta: arch -x86_64 pod install.

build_runner or code generation errors

dart run build_runner clean
dart run build_runner build --delete-conflicting-outputs
flutter gen-l10n

Location, Firebase, or Maps features do nothing at runtime

Customization

🎨
For the complete white-label walkthrough β€” app rename, bundle ID, icon, splash, colors, onboarding content, and translations for both apps plus the web platform β€” see the dedicated Branding & Customization Guide. The essentials for this app are summarized below.

App Theme & Colors

The global theme is defined in lib/config/theme/. The app supports both light and dark themes with a ThemeBLoC in features/common/. Update color values and typography in the theme files β€” changes propagate automatically via Flutter's Theme.of(context).

App Icon

# Replace the icon images:
# Android: android/app/src/main/res/mipmap-*/ic_launcher.png
# iOS: ios/Runner/Assets.xcassets/AppIcon.appiconset/

# Or use the flutter_launcher_icons package for automated generation

Adding a New Feature

  1. Create the feature folder under lib/features/<feature_name>/ with data/, domain/, and presentation/ sub-directories.
  2. Define Freezed models in data/models/ and run dart run build_runner build.
  3. Create the BLoC/Cubit in presentation/bloc/ and register it with GetIt using the @injectable annotation.
  4. Add routes in lib/config/route/route_config.dart. If the screen should be a dashboard tab, nest it inside the ShellRoute.

Modifying the Dashboard Tabs

The bottom navigation is managed by DashboardScreen in lib/features/dashboard/presentation/screens/dashboard_screen.dart. The four tabs (Home, Orders, Chat, Account) are defined as ShellRoute children in route_config.dart. To add or remove a tab, update both the ShellRoute routes list and the BottomNavigationBar items.


Need help? Reach us via the item’s Support tab on CodeCanyon or dayonesoft.com or visit our website for support.