WeatherWise is a Flutter-based mobile application that provides comprehensive weather information, including current conditions, hourly and weekly forecasts, and an interactive weather map. Featuring a clean, modern UI with dark/light mode support, the app is designed with modularity and maintainability in mind.
- Current Weather: View temperature, "feels like" value, and general conditions.
- Location Display: Displays the current location (hardcoded to New York, NY for demo).
- Weather Details: Includes wind speed, humidity, and atmospheric pressure.
- Hourly Forecast: 24-hour forecast with temperature and conditions.
- Weekly Forecast: 7-day forecast with high and low temperatures.
- Interactive Weather Map: View temperature, precipitation, cloud, and wind layers (via OpenWeatherMap).
- Dark/Light Mode: Seamlessly switch between themes.
- Responsive UI: Built with
CustomScrollViewandSliverwidgets for fluid scrolling.
- Flutter SDK:
>=3.0.0 - Dart:
>=2.17.0 - IDE: Android Studio, VS Code, or any Flutter-compatible IDE
- OpenWeatherMap API Key: Required for weather map functionality
-
Clone the Repository
git clone https://github.com/yourusername/weatherwise.git cd weatherwise -
Install Dependencies Ensure the following are in your
pubspec.yaml:dependencies: flutter: sdk: flutter flutter_map: ^7.0.2 latlong2: ^0.9.1 weather_icons: ^3.0.0 intl: ^0.19.0
Then run:
flutter pub get
-
Configure Assets Add
sky.webpto thelib/directory and updatepubspec.yaml:assets: - lib/sky.webp
-
Run the App
flutter run
lib/
├── main.dart # Entry point of the application
├── weather_wise_app.dart # Theme and main app setup
├── weather_dashboard.dart # Weather overview dashboard
├── location_display.dart # Location display widget
├── current_weather_display.dart # Current weather widget
├── weather_details_display.dart # Detailed metrics widget
├── weather_detail_item.dart # Reusable detail item widget
├── hourly_forecast_display.dart # 24-hour forecast widget
├── weekly_forecast_display.dart # 7-day forecast widget
├── weather_map_display.dart # Interactive weather map widget
└── sky.webp # Background image for SliverAppBar
flutter_map: Interactive mapslatlong2: Geolocation handlingweather_icons: Weather-related iconsintl: Internationalization and date formatting
- Launch the app to access the full weather dashboard.
- Use the app bar icon to toggle between light and dark modes.
- Scroll to view hourly and weekly forecasts, as well as the interactive weather map.
- Use the dropdown in the map view to switch between weather layers.
- Currently, weather data and location are hardcoded (New York, NY).
- Integrate real-time weather API and device location for dynamic updates.
- Ensure a valid OpenWeatherMap API key is configured for the map to work.
- The background image
sky.webpmust exist in thelib/folder and be declared inpubspec.yaml.