State.fromJson constructor

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

Implementation

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