CityModel class

城市数据模型

在这个模型中:

  • 省级行政区作为顶层对象
  • city字段包含该省下所有城市
  • area字段包含城市下所有区县

Constructors

CityModel.new({required String name, double? longitude, double? latitude, List<CityModel>? city, List<String>? area})
CityModel.fromJson(Map<String, dynamic> json)
从JSON创建模型
factory

Properties

area List<String>?
final
city List<CityModel>?
final
hashCode int
The hash code for this object.
no setterinherited
latitude double?
final
longitude double?
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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