RidezToHealth Driver is a Flutter app for drivers to manage availability, receive ride requests, navigate pickups and destinations, communicate with riders, and track earnings. The app is built with GetX, a feature-first module layout, and a layered services/repository approach to keep UI, business logic, and data access cleanly separated.
Overview
- App name: RidezToHealth Driver
- Platforms: iOS, Android, Web, Desktop (Flutter)
- SDK: Flutter with Dart
^3.8.1 - Version:
1.1.2+2 - Architecture: Feature-first modules, GetX controllers + repositories + services
Feature Highlights
- Driver status toggling with live availability
- Ride request flow with accept/decline actions
- Live map, routing, and pickup/destination context
- In-ride tools including chat and status updates
- Earnings summary and wallet actions
- Ride history with filters and detail cards
- Profile, vehicle details, and account security
- Notifications feed and alert management
- Local storage for tokens and user profile
- Real-time updates via Socket.IO
App Flow
flowchart TD
A[App Launch] --> B{First Time Install?}
B -- Yes --> C[Onboarding]
C --> D[Auth]
B -- No --> E{Logged In?}
E -- Yes --> F[Driver Home]
E -- No --> D
F --> G[Go Online]
G --> H[Ride Request]
H -- Accept --> I[Pickup & Navigation]
I --> J[In-Ride Tools]
J --> K[Complete Ride]
K --> L[Earnings & History]
H -- Decline --> G
Feature Modules
feature/app/provides the app shell, navigation, and shared layoutfeature/auth/handles login, registration, OTP, and password changesfeature/home/manages driver availability and ride request actionsfeature/map/covers maps, routing, pickup flow, and in-ride toolsfeature/earning/shows earnings summary and wallet viewsfeature/historyAndProfile/contains ride history, profile, vehicle, and notificationsfeature/identity/supports identity and verification-related flows
Architecture
- State and dependency management: GetX (
get) - Navigation:
GetMaterialAppwith custom bottom navigation - Feature-first layout: UI, controllers, services, and domain models grouped per feature
- Remote data:
ApiClientandSocketClientunderlib/helpers/remote/ - Local storage:
shared_preferencesandget_storage
Project Structure
lib/
main.dart # App entry, DI, and initial routing
app.dart # App shell and navigation
core/ # Themes, constants, widgets, onboarding
feature/ # Feature modules
app/
auth/
earning/
historyAndProfile/
home/
identity/
map/
helpers/ # DI, API client, socket client
navigation/ # Navigation widgets
payment/ # Payment and wallet utilities
utils/ # App-wide constants and helpers
assets/
images/
icons/
fonts/
Dependencies
getfor state, navigation, and DIdioandhttpfor networkingsocket_io_clientfor real-time updatesshared_preferencesandget_storagefor local persistencegoogle_maps_flutter,geolocator,location,geocodingfor map and location featurespermission_handlerfor runtime permissionsimage_pickerandfile_pickerfor media and file uploadscached_network_image,shimmer,flutter_svgfor UIwebview_flutterandurl_launcherfor embedded and external contentcamera,video_player, andpath_providerfor media capture and playbackdevice_info_plusandpackage_info_plusfor device and app metadataintlfor formatting and localizationmotion_tab_bar,pinput, andfont_awesome_flutterfor navigation and UI elements
Getting Started
- Install dependencies:
flutter pub get
- Configure API and Socket URLs in
lib/core/constants/urls.dart. - Configure the Maps API key in
lib/utils/app_constants.dartand your platform configs. - Run the app:
flutter run
Configuration Notes
- Base URLs and socket settings:
lib/core/constants/urls.dart - App constants and keys:
lib/utils/app_constants.dart - Launcher icons:
pubspec.yamlunderflutter_launcher_icons
Regenerate launcher icons:
flutter pub run flutter_launcher_iconsAssets and Fonts
- Images:
assets/images/ - Icons:
assets/icons/ - Fonts:
assets/fonts/notoSansKR/configured inpubspec.yaml
Testing
flutter testSecurity and Secrets Do not commit real API keys or production credentials. Use environment-specific builds or secure config management for secrets.