This Flutter weather application is designed to provide users with accurate weather information in an intuitive and user-friendly way. It fetches data from a weather API to display the current weather details, a complete 24-hour forecast, and a 14-day weather forecast. The app is built using the MVVM architecture and managed with the GetX state management library, ensuring a clean and maintainable codebase.
- Display current weather conditions including temperature, humidity, wind speed, and more.
- Show a comprehensive 24-hour forecast with temperature and weather conditions for each hour.
- Provide a 14-day weather forecast with daily high and low temperatures, weather descriptions, and icons.
- User-friendly interface with intuitive design and smooth navigation.
- Automatic location detection or manual location input for accurate weather information.
- Error handling for API requests and network connectivity issues.
The app is built using the Model-View-ViewModel (MVVM) architecture. This design pattern separates the concerns of data, UI, and business logic, leading to a more modular and testable codebase. The app's architecture is further enhanced by GetX, a state management library that simplifies reactive programming and state transitions.
Follow these steps to get the app up and running:
- Clone the repository:
git clone https://github.com/Hamad-Anwar/Flutter-Weather-With-APIs-GETX-MVVM.git
- Navigate to the project directory:
cd weather
- Install dependencies:
flutter pub get
- Run the app:
flutter run
The app integrates with a weather API to fetch weather data. The API key should be placed in the lib/data/network/api_services.dart
file. You can obtain an API key by signing up on the weather service's website.
State management is handled using the GetX library. The architecture separates the app into models, views, and view models, providing a reactive and efficient way to manage application state and update the UI.
- GetX - State management and dependency injection.
- http - For making HTTP requests to the weather API.
- intl - Internationalization and formatting of dates.
For a complete list of dependencies, check the pubspec.yaml
file.
Contributions are welcome! If you find any issues or want to add new features, feel free to fork the repository and submit a pull request. Please follow the existing code style and structure.