Features¶
The mobile app is organized into feature modules under lib/features/. Each module contains presentation pages, widgets, and (optionally) providers and models.
| Module | Pages | Source Directory | Key Providers |
|---|---|---|---|
| Authentication | 2 | features/auth/ |
authStateProvider, currentUserProvider |
| Onboarding | 1 | features/onboarding/ |
onboardingService |
| Home | 3 | features/public/ |
cmsProvider, featuredProductsProvider |
| Products | 3 | features/pharmacy/ + public/ |
productsProvider, categoriesProvider |
| Pharmacies | 3 | features/pharmacy/ |
pharmaciesProvider, nearbyPharmaciesProvider |
| Cart & Checkout | 2 | features/cart/ |
cartProvider, addressProvider |
| Orders | 5 | features/orders/ + public/ |
ordersProvider, orderDetailsProvider |
| Payments | 4 | features/cart/ + orders/ |
paymentService |
| Promotions & Offers | — | Shared widgets | activeOffersMapProvider |
| Notifications | 2 | features/public/ |
notificationsProvider, unreadCountProvider |
| Profile & Security | 17 | features/profile/ |
profileProvider, securitySettingsProvider |
| Wishlist | 1 | features/public/ |
wishlistProvider |
| Chat & Messenger | 3 | features/pharmacist/ |
chatRoomsStreamProvider |
| Reviews | — | Shared widgets | productReviewsProvider |
| Pharmacist Dashboard | 16 | features/pharmacist/ |
pharmacistProvider |
| Featured & Subscriptions | — | core/providers/ |
subscriptionServiceProvider |
Shared Widgets¶
18 reusable widgets live in lib/widgets/shared/:
| Widget | File | Purpose |
|---|---|---|
AppToast |
app_toast.dart |
Toast notifications |
CustomButton |
custom_button.dart |
Styled buttons |
CustomCard |
custom_card.dart |
Reusable cards |
CurvedHeader |
curved_header.dart |
Decorative headers |
EmptyState |
empty_state.dart |
Empty state placeholders |
LoadingIndicator |
loading_indicator.dart |
Loading spinners |
ProductCard |
product_card.dart |
Product grid items |
QuickActionItem |
quick_action_item.dart |
Home quick action buttons |
ResponsiveLayout |
responsive_layout.dart |
Adaptive layouts |
SplashPage |
splash_page.dart |
App splash screen |
StatCard |
stat_card.dart |
KPI statistic cards |
LoginPromptModal |
login_prompt_modal.dart |
Guest → login prompts |
ModernDropdown |
modern_dropdown.dart |
Custom dropdowns |
LanguageSelectionDialog |
language_selection_dialog.dart |
Language picker |
AppDialogs |
app_dialogs.dart |
Reusable dialogs |
AppLoadingScreen |
app_loading_screen.dart |
Full-screen loading |
Related¶
- Architecture — Code structure and patterns
- Providers — Riverpod state management
- Models — Data models