# Base Entities

Last updated:

<!-- -->

October 18, 2026

<!-- -->

\| 5 minutes read

<br />

<br />

Weather-related functionalities are organized into distinct classes, each designed to encapsulate specific weather data.

The main classes include `LocationForecast`, `Conditions`, `Parameter`, and `Warning`. This guide provides a detailed explanation of each class and its purpose.

## LocationForecast[​](#locationforecast "Direct link to LocationForecast")

The `LocationForecast` class retains data such as the forecast update datetime, the geographic location, and forecast data.

| Property   | Type               | Description                                                       |
| ---------- | ------------------ | ----------------------------------------------------------------- |
| `updated`  | `DateTime`         | Forecast update datetime (UTC)                                    |
| `coord`    | `Coordinates`      | Geographic location                                               |
| `forecast` | `List<Conditions>` | Forecast data                                                     |
| `warnings` | `List<Warning>`    | Active weather warnings at the location. See [Warning](#warning). |

![Current Weather Forecast explained](/docs/flutter/assets/images/example_flutter_weather_base_entities-1c1419ae963055675f6bb613ee1c3d61.png)

**Current Weather Forecast explained**

info

Warnings are only populated by the current weather request (`getCurrent`) and the route forecast request (`getForecast`). The hourly and daily forecast requests never carry warnings.

## Conditions[​](#conditions "Direct link to Conditions")

The `Conditions` class retains weather conditions for a given timestamp.

| Property      | Type              | Description                                                     |
| ------------- | ----------------- | --------------------------------------------------------------- |
| `type`        | `String`          | For possible values see add ref\[PredefinedParameterTypeValues] |
| `stamp`       | `DateTime`        | Datetime for condition (UTC)                                    |
| `image`       | `Uint8List`       | Image representation as `Uint8List`                             |
| `img`         | `Img`             | The conditions image as `Img`                                   |
| `description` | `String`          | Description translated according to the current SDK language    |
| `daylight`    | `Daylight`        | Daylight condition                                              |
| `params`      | `List<Parameter>` | Parameter list                                                  |

### PredefinedParameterTypeValues[​](#predefinedparametertypevalues "Direct link to PredefinedParameterTypeValues")

The `PredefinedParameterTypeValues` class contains the common values for `Parameter.type` and `Conditions.type`.

| Property          | Description       | Unit |
| ----------------- | ----------------- | ---- |
| `airQuality`      | 'AirQuality'      | -    |
| `dewPoint`        | 'DewPoint'        | °C   |
| `feelsLike`       | 'FeelsLike'       | °C   |
| `humidity`        | 'Humidity'        | %    |
| `pressure`        | 'Pressure'        | mb   |
| `sunRise`         | 'Sunrise'         | -    |
| `sunSet`          | 'Sunset'          | -    |
| `temperature`     | 'Temperature'     | °C   |
| `uv`              | 'UV'              | -    |
| `visibility`      | 'Visibility'      | km   |
| `windDirection`   | 'WindDirection'   | °    |
| `windSpeed`       | 'WindSpeed'       | km/h |
| `temperatureLow`  | 'TemperatureLow'  | °C   |
| `temperatureHigh` | 'TemperatureHigh' | °C   |

danger

The `WeatherService` may return data with varying property types, depending on data availability. A response might include only a subset of the values listed above.

## Parameter[​](#parameter "Direct link to Parameter")

The `Parameter` class contains weather parameter data.

| Property | Type     | Description                                                     |
| -------- | -------- | --------------------------------------------------------------- |
| `type`   | `String` | For possible values see add ref\[PredefinedParameterTypeValues] |
| `value`  | `double` | Value                                                           |
| `name`   | `String` | Name translated according to the current SDK language           |
| `unit`   | `String` | Unit                                                            |

## Warning[​](#warning "Direct link to Warning")

The `Warning` class describes a weather hazard active at a given location.

| Property        | Type            | Description                                                                                                                                                                             |
| --------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`          | `String`        | Encoded warning code in the form `<HAZARD>.<SEVERITY>`, e.g. `SEHR.V`.                                                                                                                  |
| `name`          | `String`        | Display name translated according to the current SDK language. Empty when the hazard code is not known by the local weather resource - fall back to `phenomenon`.                       |
| `severity`      | `String`        | Severity word, translated when the severity code is known locally, otherwise the server wording (English).                                                                              |
| `phenomenon`    | `String`        | Provider phenomenon text, in the source language as sent by the weather provider.                                                                                                       |
| `description`   | `String`        | Provider description text, in the source language as sent by the weather provider.                                                                                                      |
| `area`          | `String`        | Area or region name from the provider.                                                                                                                                                  |
| `startStamp`    | `DateTime?`     | Start of the warning validity interval (UTC). Null when the provider supplies none.                                                                                                     |
| `endStamp`      | `DateTime?`     | End of the warning validity interval (UTC). Null when the provider supplies none.                                                                                                       |
| `color`         | `Color`         | Warning color.                                                                                                                                                                          |
| `coverage`      | `List<Marker>`  | Coverage polygons. Only populated when the coverage geometry was requested. See [Coverage geometry](/docs/flutter/guides/weather/weather-service.md#request-warning-coverage-polygons). |
| `severityLevel` | `SeverityLevel` | Normalized, cross-provider severity bucket. Use it for labels and grouping. See [Severity Level](#severity-level).                                                                      |
| `severityRank`  | `int`           | Composite cross-provider ordering key in the range 0-514. Sort **descending** on it.                                                                                                    |

### Severity Level[​](#severity-level "Direct link to Severity Level")

The `SeverityLevel` enum is the CAP-aligned display bucket of a warning, derived from `severityRank ~/ 100`. It is stamped by the same classification that sets `Warning.color`, so the level and the color never disagree.

| Enum Case  | Description                                                                         |
| ---------- | ----------------------------------------------------------------------------------- |
| `unknown`  | Severity could not be resolved (bucket 0). Sorts last, but is still a real warning. |
| `minor`    | Minor (green).                                                                      |
| `moderate` | Moderate (yellow).                                                                  |
| `severe`   | Severe (orange).                                                                    |
| `extreme`  | Extreme (red and magenta).                                                          |

### Order overlapping warnings[​](#order-overlapping-warnings "Direct link to Order overlapping warnings")

Use `severityLevel` for labels and grouping, and sort on `severityRank` when several warnings overlap. The rank is composed as `severity bucket * 100 + hazard class`: the bucket (0-5) dominates, and the hazard class (0-14) breaks same-severity ties, so a flood sorts ahead of a heat warning of the same severity.

```dart
final warnings = [...locationForecast.warnings]
  ..sort((a, b) => b.severityRank.compareTo(a.severityRank));

if (warnings.isNotEmpty) {
  final mostSevere = warnings.first;
  showSnackbar('${mostSevere.name} (${mostSevere.severityLevel})');
}

```

### Draw warning coverage[​](#draw-warning-coverage "Direct link to Draw warning coverage")

When the coverage geometry was requested, every entry in `Warning.coverage` is a `Marker` holding one polygon: part 0 is the outer ring and the following parts are the holes. Rings are closed, with the first point repeated as the last, as published by the weather provider.

Give each warning its own collection so it can be drawn in its own `color`:

```dart
for (final warning in locationForecast.warnings) {
  if (warning.coverage.isEmpty) {
    continue;
  }

  final collection = MarkerCollection(
    markerType: MarkerType.polygon,
    name: 'warning_${warning.type}',
  );

  for (final polygon in warning.coverage) {
    collection.add(polygon);
  }

  mapController.preferences.markers.add(
    collection,
    settings: MarkerCollectionRenderSettings(polygonFillColor: warning.color),
  );
}

```

## Related examples[​](#related-examples "Direct link to Related examples")

* [Weather Forecast](/docs/flutter/examples/places-search/weather-forecast.md)
