Region.fromJson constructor

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

Implementation

Region.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  name = json['name'];
  countryId = json['country_id'];
  if (json['city'] != null) {
    city = [];
    json['city'].forEach((v) {
      city.add(new City.fromJson(v));
    });
  }
}