The Weather App is a simple Flutter application that allows users to check the weather forecast for a specific city. It provides information about the current weather conditions, hourly forecasts, and additional weather details.
-
Current Weather: Display the current temperature, sky conditions, and an icon representing the weather.
-
Hourly Forecast: Show a forecast for the next five hours, including the time, temperature, and weather icon.
-
Additional Information: Provide additional weather details such as humidity, wind speed, and pressure.
-
Refresh Data: Allow users to refresh weather data by tapping the refresh button on the app bar.
To run the Weather App on your local machine, follow these steps:
-
Clone this repository to your computer:
git clone https://github.com/hammadali1805/weather_app_flutter.git
-
Navigate to the project directory:
cd weather_app_flutter
-
Install dependencies:
flutter pub get
-
Obtain an OpenWeatherMap API Key:
- Visit OpenWeatherMap and create an account if you don't have one.
- Generate an API key.
- Replace the value of const
openWeatherAPIKey
insecrets.dart
with your actual API key.
-
Run the app:
flutter run
- When you launch the app, it will display weather information for the city provided.
- You can refresh the weather data by tapping the refresh button on the app bar.
- The hourly forecast section shows the weather forecast for the next five hours.
The Weather App uses the following packages:
http
: For making HTTP requests to fetch weather data.intl
: For formatting dates and times.flutter/material.dart
: For building the app's user interface.
You can find these dependencies in the pubspec.yaml
file and install them using flutter pub get
.
Contributions to the Weather App are welcome! You can contribute by:
- Reporting issues or suggesting enhancements.
- Submitting pull requests to address existing issues.
- Adding new features or improvements.
- Weather data is provided by OpenWeatherMap.
If you have any questions or need further assistance, feel free to contact us at hammadalipbt18@gmail.com.
Enjoy checking the weather with the Weather App!