A modern, responsive weather application built with Flutter, utilizing the MVVM (Model-View-ViewModel) architecture and integrated with external APIs for comprehensive weather data and engaging daily notifications via the Gemini API.
AppDemo.mov
- Current Weather: Real-time display of temperature, conditions, and location-specific data.
- 5-Day Forecast: Detailed forecast view to help users plan ahead.
- MVVM Architecture: Clean, scalable, and maintainable codebase structure using the MVVM pattern.
- Dual API Integration:
- Weather API: Fetches and displays accurate weather information.
- Gemini API: Generates unique, contextual, customizable daily notification messages based on the current and forecasted weather (e.g., "Perfect day for a run! Expect sunshine until 5 PM.").
- State Management: Utilizes Riverpod for efficient state handling.
- Modern UI: Developed with a responsive Material 3 (M3) design.
The project is structured following the MVVM pattern for clear separation of concerns:
| Layer | Responsibility | Key Folders/Files |
|---|---|---|
| Model | Data structures and business entities. | lib/model/ |
| View | UI components, screens, and user interaction. | lib/view/ |
| ViewModel | Business logic, state management, and interaction with the Repository. | lib/viewmodel/ |
| Data | API communication, data parsing, and storage logic. | lib/services/, lib/repositories/ |
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Flutter SDK (stable channel)
- Dart SDK
- An IDE (VS Code or Android Studio) with Flutter/Dart plugins
-
Clone the repository:
git clone https://github.com/Shimanto9sqr/zenith.git cd zenith -
Install dependencies:
flutter clean flutter pub get
-
Set up API Keys: This app requires two API keys for full functionality.
const String GEMINI_API_KEY = "YOUR_GEMINI_API_KEY"; const String WEATHER_API_KEY = "YOUR_WEATHER_API_KEY";
-
Run the App:
flutter run
| Package | Purpose |
|---|---|
flutter_riverpod |
State Management (connecting View and ViewModel). |
dio |
Handling network requests to both APIs. |
google_generative_ai |
Integrating the Gemini API for engaging notifications. |
flutter_local_notifications |
Scheduling and displaying daily, personalized messages. |
shared_preferences |
Local storage for user settings (e.g., default city). |