Overview
ThePollenView component displays pollen and allergen information in a visually appealing grid format. It shows pollen levels for different types (grass, tree, weed) and specific plants, with detailed sheets featuring plant images, health recommendations, and seasonal information.
Visual Display
The component presents:- Header with “Allergy Tracker” title and Google attribution
- 2-column grid of pollen item cards
- Each card shows pollen name, level value, progress bar, and status
- Tappable cards that open detailed information sheets
- Empty state when no pollen data is available
Component Definition
Props / Parameters
Array of pollen items to display. Each
PollenItem contains:id: Unique identifiername: Display name (e.g., “Grass”, “Ragweed”)value: Pollen level (0-5 scale)category: Status category (None, Low, Moderate, High, Very High)isPlant: Whether this is a specific plant or general categoryimageUrl: Optional plant image URLfamily: Plant family informationseason: Peak pollen seasonappearance: Plant appearance descriptionhealthRecommendations: Array of health tips
Pollen Item Card
Each card in the grid displays:Detail Sheet Features
The pollen detail sheet provides comprehensive information:Hero Section
Current Level Display
Plant Image
For plant-specific entries, displays AsyncImage:Plant Information
Displays botanical details when available:Pollen Index Scale
The detail sheet includes a comprehensive scale:- None: 0
- Low: 1
- Moderate: 2-3
- High: 4
- Very High: 5
Empty State
When no pollen data is available:Usage in App
Data Source
Pollen data is powered by Google’s Pollen API, as indicated in the header attribution.Source Location
BreezeApp/Views/Environmental/PollenView.swift:3