How abdhakeem18/weather-app works
Weather App is a Flutter client for OpenWeatherMap. Its principal workflow is to obtain a location or accept a city search, retrieve weather data, and present current conditions and forecasts; users can also inspect air quality, manage favorites, and customize settings. The tree identifies the relevant screens, providers, services, and models. Dart implementation excerpts were not provided, so feature-to-feature wiring is shown only where the README documents it; unverified internal calls are omitted.
Main entry points: weather_api_service.dart Weather API · home_screen.dart Home screen · weather_provider.dart Weather state · search_screen.dart City search
Components 23
App and screens
- App entry
lib/main.dart - Home screen
lib/features/home/presentation/pages/home_screen.dart - Weather card
lib/features/home/presentation/widgets/weather_card.dart - Weather details
lib/features/home/presentation/widgets/weather_details.dart - Forecast list
lib/features/home/presentation/widgets/forecast_list.dart - City search
lib/features/search/presentation/pages/search_screen.dart - Forecast screen
lib/features/forecast/presentation/pages/forecast_screen.dart - Favorites screen
lib/features/favorites/presentation/pages/favorites_screen.dart - Settings screen
lib/features/settings/presentation/pages/settings_screen.dart
Weather data
- Weather state
lib/features/weather/presentation/providers/weather_provider.dart - Weather API
lib/features/weather/data/services/weather_api_service.dart - Weather model
lib/features/weather/data/models/weather_model.dart - Forecast model
lib/features/weather/data/models/forecast_model.dart - Air quality model
lib/features/weather/data/models/air_quality_model.dart
Personal features
- Favorites state
lib/features/favorites/presentation/providers/favorites_provider.dart - Favorite city
lib/features/favorites/data/models/favorite_city_model.dart - Settings state
lib/features/settings/presentation/providers/settings_provider.dart
Shared services
- Location service
lib/core/services/location_service.dart - Offline cache
lib/core/services/cache_service.dart - App theme
lib/core/theme/app_theme.dart - App configuration
lib/core/config/app_config.dart
Other components
- User
- OpenWeatherMap
Connections 21
- User → App entry: opens app
README.md - User → City search: searches cities
README.md - User → Favorites screen: manages favorites
README.md - User → Settings screen: changes preferences
README.md - User → Home screen: views weather
README.md - Location service → Weather state: provides location
- City search → Weather API: searches cities
- Weather API → OpenWeatherMap: requests weather data
README.md - Weather state → Weather API: fetches weather
- Home screen → Weather card: shows conditions
README.md - Home screen → Weather details: shows details
README.md - Home screen → Forecast list: shows quick forecast
README.md - Forecast screen → Forecast model: presents forecast
README.md - Weather API → Weather model: parses current data
- Weather API → Air quality model: fetches air quality
- Favorites screen → Favorites state: manages favorites
- Favorites state → Favorite city: stores city entries
- Settings screen → Settings state: updates preferences
- Weather state → Offline cache: uses cached data
- Settings state → App theme: selects appearance
- Weather API → App configuration: uses API settings