Products¶
Source: pharmanet/lib/features/pharmacy/ + pharmanet/lib/features/public/
Pages¶
| Page | File | Description |
|---|---|---|
PharmacyCatalogPage |
features/pharmacy/presentation/pages/pharmacy_catalog_page.dart |
Products within a pharmacy |
ProductDetailsPage |
features/pharmacy/presentation/pages/product_details_page.dart |
Full product detail with offers |
AllFeaturedProductsPage |
features/public/presentation/pages/all_featured_products_page.dart |
All featured products grid |
AdvancedSearchSheet |
features/public/presentation/widgets/advanced_search_sheet.dart |
Bottom sheet search with filters |
API¶
Source: pharmanet/lib/core/api/product_api.dart
| Method | Description |
|---|---|
fetchProducts(page, limit, categoryId, search, minPrice, maxPrice, minRating, prescription, inStock) |
Paginated product list with filters |
getProductById(id) |
Full product details with category, brand, seller, variants |
searchProducts(query) |
Real-time search by name/description |
fetchCombinedProducts(limit) |
Featured-first product list |
getFeaturedProducts(limit) |
Subscribed pharmacy featured products |
getProductVariants(productId) |
Variant combinations for a product |
Providers¶
| Provider | Type | Description |
|---|---|---|
categoriesProvider |
FutureProvider<List<Category>> |
All categories |
productsProvider |
FutureProvider.family<ProductParams> |
Filtered product list |
productDetailsProvider |
FutureProvider.family<String> |
Single product detail |
featuredProductsProvider |
FutureProvider<List<Product>> |
Featured products |
combinedProductsProvider |
FutureProvider.family<ProductParams> |
Featured-first products |
searchProductsProvider |
FutureProvider.family<String> |
Search results |
Product Detail Page¶
The ProductDetailsPage includes:
| Section | Details |
|---|---|
| Image Carousel | Swipeable product images with photo_view zoom |
| Product Info | Name, price, dosage, manufacturer, prescription badge |
| Offer Banner | Discount badge from activeOffersMapProvider |
| Variants | Size/color selection with price/stock updates |
| Specifications | Category, brand, expiry, weight, dimensions |
| Seller Card | Pharmacy info with rating and chat button |
| Reviews | Rating summary + review list |
| Bottom Bar | Quantity selector + Add to Cart / Buy Now |
Offer-Aware Pricing¶
Source: pharmanet/lib/features/pharmacy/presentation/widgets/product_header_info.dart
The pricing widget checks activeOffersMapProvider for each product:
If an active offer exists: - Show offer price as the main price (green) - Show original price with strikethrough - Show discount badge (e.g., "-20%")
Variants¶
Products can have:
- VariantOption (e.g., "Size", "Color")
- VariantValue (e.g., "Small", "Red")
- VariantCombination (SKU-level price + stock)
The CombinationsTable in the admin web app manages these.
Related¶
- Pharmacies — Pharmacy catalog and detail
- Promotions & Offers — Offer pricing details
- Cart & Checkout — Adding products to cart
- DB: Products — Products table schema