Town class

Town data model

{
  "id": 197,
  "name": "Минск",
  "region": {
    "id": 84,
    "name": "Минск",
    "country": {
      "id": 5,
      "name": "Беларусь"
    }
  },
  "country": {
    "id": 5,
    "name": "Беларусь"
  }
}

Constructors

Town({required int id, required String name, required Town? region, required Country? country})
Town.fromJson(Map<String, dynamic> json)
factory
Town.fromRawJson(String str)
factory

Properties

country Country?
final
hashCode int
The hash code for this object.
no setteroverride
id int
final
name String
final
region Town?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({required int id, required String name, required Town? region, required Country? country}) Town
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toRawJson() String
toString() String
A string representation of this object.
override

Operators

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