Overview
ThePollutantsGrid component displays a detailed breakdown of individual air pollutants (PM2.5, PM10, NO2, SO2, O3, CO). Each pollutant is shown in a card-style row that users can tap to view comprehensive details in a modal sheet.
Visual Display
The grid presents:- Apple-style grouped list of pollutant cards
- Color-coded icons for each pollutant type
- Current concentration values with units
- Status labels (Good, Moderate, Unhealthy)
- Tap gesture to open detailed information sheets
Component Definition
Props / Parameters
Array of pollutant readings to display. Each
PollutantReading contains:type: Pollutant type (PM2.5, PM10, NO2, SO2, O3, CO)value: Current concentration valuestatus: Health status (Good, Moderate, Unhealthy)- Icon and unit information
Pollutant Row Component
Each row displays a single pollutant with:Detail Sheet
Tapping a pollutant opens a comprehensive detail sheet featuring:- Large circular icon with status color
- Current concentration with large typography
- Status badge
- “About” section explaining the pollutant
- Health ranges showing Good/Moderate/Unhealthy thresholds
Pollutant Types
The component supports six major air pollutants:- PM2.5 - Fine Particulate Matter (μg/m³)
- PM10 - Coarse Particulate Matter (μg/m³)
- NO2 - Nitrogen Dioxide (μg/m³)
- SO2 - Sulfur Dioxide (μg/m³)
- O3 - Ozone (μg/m³)
- CO - Carbon Monoxide (μg/m³)
Health Range Display
The detail sheet includes aRangeRow component showing health thresholds:
Usage in App
Source Location
BreezeApp/Views/Dashboard/PollutantsGrid.swift:3