Town.fromJson constructor

Town.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Town.fromJson(Map<String, dynamic> json) => Town(
      id: json["id"],
      name: json["name"],
      region: json["region"] == null ? null : Town.fromJson(json["region"]),
      country:
          json["country"] != null ? Country.fromJson(json["country"]) : null,
    );