toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['citycode'] = citycode;
  data['num'] = num;
  if (districts != null) {
    data['districts'] = districts!.map((v) => v.toJson()).toList();
  }
  data['city'] = city;
  data['adcode'] = adcode;
  return data;
}