Cities.fromJson constructor

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

Implementation

Cities.fromJson(Map<String, dynamic> json) {
  citycode = json['citycode'];
  num = json['num'];
  if (json['districts'] != null) {
    districts = <Districts>[];
    json['districts'].forEach((v) {
      districts!.add(Districts.fromJson(v));
    });
  }
  city = json['city'];
  adcode = json['adcode'];
}