CityWidget class
Representation of a city used in WidgetData.
- Annotations
Constructors
- CityWidget({String? city, DateTime? timestamp, String? timeString, double? aareTemperature, String? aareTemperatureText, String? aareTemperatureTextShort, double? flow, String? flowText, int? flowDangerLevel, double? aareTemperatureForecast2h, double? airTemperature, String? sunTotal})
-
CityWidget.fromJson(Map<
String, dynamic> json) -
Creates a CityWidget from a JSON object.
factory
-
CityWidget.fromJsonWithCity(Map<
String, dynamic> json, String? city) -
Creates a CityWidget from a JSON object with a given city.
factory
Properties
- aareTemperature ↔ double?
-
Current temperature of the Aare in °C, rounded to one decimal place.
getter/setter pair
- aareTemperatureForecast2h ↔ double?
-
Forecasted water temperature in 2 hours in °C.
getter/setter pair
- aareTemperatureText ↔ String?
-
Description of the water temperature.
getter/setter pair
- aareTemperatureTextShort ↔ String?
-
Short version (less than 15 characters) of the description of the water temperature.
getter/setter pair
- airTemperature ↔ double?
-
Current air temperature in °C.
getter/setter pair
- city ↔ String?
-
Unique identifier for the city.
getter/setter pair
- flow ↔ double?
-
Current flow of the Aare in m³/s.
getter/setter pair
- flowDangerLevel ↔ int?
-
Current danger level of the flow at this location, ranging from 1 to 5.
Defined by the BAFU.
1 is without danger, from 2 on there is a danger.
getter/setter pair
- flowText ↔ String?
-
Description of the flow.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sunTotal ↔ String?
-
Total expected sunshine duration in the format 'hh:mm'.
getter/setter pair
- timestamp ↔ DateTime?
-
Timestamp of the data.
getter/setter pair
- timeString ↔ String?
-
String representation of the timestamp in the format 'HH:mm'.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited