A Flutter weather app that uses the weatherapi.com API to fetch weather data.
- Fetches current weather data for a specified location.
- Displays temperature, humidity, wind speed, and weather conditions.
- Simple and intuitive user interface.
-
Clone the repository:
git clone https://github.com/yourusername/flutter_weather_app.git
-
Navigate to the project directory:
cd flutter_weather_app -
Install the required dependencies:
flutter pub get
-
Open constants.dart and replace
YOUR_API_KEYwith your actual API key from weatherapi.com:const String apiKey = 'YOUR_API_KEY';
-
Run the app on your preferred device or emulator:
flutter run
-
lib: Contains the main source code for the Flutter app.
- api.dart: Handles API requests to fetch weather data.
constants.dart: Contains constant values used throughout the app.homepage.dart: Defines the UI for the homepage.main.dart: Entry point of the application.weathermodel.dart: Defines the data model for weather data.
-
android: Contains the Android-specific files and configurations.
-
ios: Contains the iOS-specific files and configurations.
-
linux: Contains the Linux-specific files and configurations.
-
macos: Contains the macOS-specific files and configurations.
-
web: Contains the web-specific files and configurations.
-
windows: Contains the Windows-specific files and configurations.
-
test: Contains the unit tests for the app.
http: A package for making HTTP requests.provider: A package for state management.flutter_launcher_icons: A package for customizing app icons.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature-branch). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or feedback, please contact grefielkent@gmail.com.