Weather Magic, an elegant, animated weather application developed with Flutter.
- Real-Time Weather: Live data retrieval (temperature, conditions, humidity, UV index, and wind speed) using the free Open-Meteo API.
- Interactive Interface: Animated transitions, floating particle effects, and a premium design using
flutter_animate. - Dynamic Theme: Smooth and elegant transition between Light Mode and Dark Mode.
- Live Map & GPS: Google Maps integration coupled with
geolocatorandgeocodingto display exact location forecasts with precise neighborhood names.
The project follows a clean architecture and is easy to maintain:
lib/core/: Constants, App Routes, Utilities (Extensions), and Theme logic.lib/data/: Models (WeatherData) and Network Services (WeatherService).lib/presentation/: Reusable UI Screens and Widgets.
To run this project locally, you will need two API keys.
Weather Magic uses Open-Meteo for real-time weather data. The great thing about Open-Meteo is that it is completely free for non-commercial use and does not require an API key!
Note: The project previously referenced OpenWeatherMap, but we have migrated to Open-Meteo to simplify the setup process for new users.
How to get the key:
- Go to the OpenWeather website.
- Create a free account or log in.
- Generate a new key and copy it.
- In the code, open
lib/core/constants/app_constants.dartand paste your key:static const String openWeatherApiKey = 'YOUR_OPEN_WEATHER_API_KEY';
The application integrates a Google Maps view to visually illustrate the selected city.
How to get the key:
- Go to the Google Cloud Console.
- Create a new project (or select an existing one).
- Go to APIs & Services > Library.
- Search for and Enable the API:
Maps SDK for Android
- Go to APIs & Services > Credentials.
- Click on Create credentials > API key. Copy your new API key.
Where to configure the Google Maps key:
For Android:
Open android/app/src/main/AndroidManifest.xml and update the meta-data tag inside <application>:
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="YOUR_GOOGLE_MAPS_API_KEY_HERE"/>Note: The application also requires GPS permissions (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION) and uses the Apache HTTP legacy library (org.apache.http.legacy) to support older map renderers. These are already pre-configured in the AndroidManifest.xml.
Once you have configured your API keys:
- Clone the repository.
- Run
flutter pub getto install all dependencies. - Run the application on your preferred emulator or a physical device:
flutter run