toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = id;
  data['name'] = name;
  data['name_ar'] = nameAr;
  data['emoji'] = emoji;
  data['emojiU'] = emojiU;
  data['iso2'] = iso2;
  data['iso3'] = iso3;
  data['countrycode'] = countrycode;
  data['frenchname'] = frenchname;
  if (state != null) {
    data['state'] = state!.map((v) => v.toJson()).toList();
  }
  return data;
}