WeatherInfo class

天气信息模型

Constructors

WeatherInfo({required String city, required double temperature, required String condition, required String description, required int humidity, required double windSpeed, required DateTime date, required int minTemp, required int maxTemp})
WeatherInfo.fromJson(Map<String, dynamic> json)
factory

Properties

city String
final
condition String
final
date DateTime
final
description String
final
dressingSuggestion String
获取穿衣建议
no setter
hashCode int
The hash code for this object.
no setterinherited
humidity int
final
maxTemp int
final
minTemp int
final
needsUmbrella bool
是否需要雨具
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
temperature double
final
weatherEmoji String
获取天气图标emoji
no setter
windSpeed double
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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