WeatherService class

Service for fetching weather data from Open-Meteo API.

Constructors

WeatherService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCurrentWeather({required double latitude, required double longitude}) Future<WeatherData>
Fetch current weather data for a location.
getForecastWeather({required double latitude, required double longitude, int days = 7}) Future<HourlyWeatherData>
Fetch forecast weather data (next N days).
getHistoricalWeather({required double latitude, required double longitude, required DateTime startDate, required DateTime endDate}) Future<HourlyWeatherData>
Fetch historical weather data for a specific date range.
getPastWeather({required double latitude, required double longitude, int days = 10}) Future<HourlyWeatherData>
Fetch past weather data (last N days, actual historical data only).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited