Skip to content

Home

Source: pharmanet/lib/features/public/presentation/pages/

Pages

Page File Description
PublicHomePage public/presentation/pages/public_home_page.dart Main customer home with HomeTab
HomeTab public/presentation/pages/home_tab.dart Full home screen content
AllCategoriesPage public/presentation/pages/all_categories_page.dart Full category grid
AllFeaturedProductsPage public/presentation/pages/all_featured_products_page.dart All featured products

HomeTab Sections (top to bottom)

Section Widget/Provider Description
Notification Bell unreadCountProvider Icon badge with unread count
Main Banner Carousel bannersProvider (position: home_main) Auto-scrolling banner rotator
Quick Actions QuickActionItem Alerts, Orders, Wallet, Language (alerts badge from unreadCountProvider)
Categories Grid categoriesProvider Top categories row with "See All"
Hot Deals Carousel activePromotionsProvider Active promotion cards with discount info
Featured Products combinedProductsProvider (featured-first) Product grid with offer pricing
Nearby Pharmacies nearbyPharmaciesProvider (subscribed only) Horizontal pharmacy cards

Cursor-Based Data Flow

// HomeTab fetches data in parallel:
final bannersAsync = ref.watch(bannersProvider('home_main'));
final categoriesAsync = ref.watch(categoriesProvider);
final promotionsAsync = ref.watch(activePromotionsProvider);
final productsAsync = ref.watch(combinedProductsProvider(ProductParams(limit: 10)));
final pharmaciesAsync = ref.watch(nearbyPharmaciesProvider);

Key Widgets

Widget File Purpose
ProductCard widgets/shared/product_card.dart Product grid item with offer-aware pricing
QuickActionItem widgets/shared/quick_action_item.dart Icon + label action buttons
NearbyPharmacies widgets/home/nearby_pharmacies.dart Horizontal pharmacy scroll
AdvancedSearchSheet public/presentation/widgets/advanced_search_sheet.dart Search bottom sheet with filters