Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
85 righe
3.0 KiB
85 righe
3.0 KiB
class Actor { |
|
late int id; |
|
late String description; |
|
late String contacts; |
|
|
|
Actor.fromJson(Map<String, dynamic> json) |
|
: this.id = (json['id'] != null ? json['id'] : 0), |
|
this.description = |
|
(json['description'] != null ? json['description'] : ""), |
|
this.contacts = (json['contacts'] != null ? json['contacts'] : ""); |
|
Actor() {} |
|
Map toJson() => {'id': id, 'description': description, 'contacts': contacts}; |
|
} |
|
|
|
class Organizzazioni { |
|
late int id; |
|
late String acronym; |
|
late String address; |
|
late String district; |
|
late String cap; |
|
late String province; |
|
late String coordinates; |
|
late String feature_collection; |
|
late String photo; |
|
late OrganisationType organisation_type; |
|
late dynamic emails; |
|
late dynamic mobile_phones; |
|
late dynamic phones; |
|
late Actor actor; |
|
Organizzazioni() {} |
|
|
|
Organizzazioni.fromJson(Map<String, dynamic> json) |
|
: this.id = (json['id'] != null ? json['id'] : 0), |
|
this.acronym = (json['acronym'] != null ? json['acronym'] : ""), |
|
this.address = |
|
(json['address'] != null ? json['address'].toString() : ""), |
|
this.district = |
|
(json['district'] != null ? json['district'].toString() : ""), |
|
this.cap = (json['cap'] != null ? json['cap'].toString() : ""), |
|
this.province = |
|
(json['province'] != null ? json['province'].toString() : ""), |
|
this.coordinates = |
|
(json['coordinates'] != null ? json['coordinates'].toString() : ""), |
|
this.feature_collection = (json['feature_collection'] != null |
|
? json['feature_collection'].toString() |
|
: ""), |
|
this.emails = (json['emails'] != null ? json['emails'] : []), |
|
this.mobile_phones = |
|
(json['mobile_phones'] != null ? json['mobile_phones'] : []), |
|
this.phones = (json['phones'] != null ? json['phones'] : []), |
|
this.photo = (json['photo'] != null ? json['photo'].toString() : ""), |
|
this.actor = (json['actor'] != null |
|
? Actor.fromJson(json['actor']) |
|
: new Actor()), |
|
this.organisation_type = (json['organisation_type'] != null |
|
? OrganisationType.fromJson(json['organisation_type']) |
|
: new OrganisationType()); |
|
|
|
Map toJson() => { |
|
'id': id, |
|
'acronym': acronym, |
|
'address': address, |
|
'district': district, |
|
'cap': cap, |
|
'coordinates': coordinates, |
|
'feature_collection': feature_collection, |
|
'photo': photo, |
|
'emails': emails, |
|
'mobile_phones': mobile_phones, |
|
'phones': phones, |
|
'organisation_type': organisation_type.toJson() |
|
}; |
|
} |
|
|
|
class OrganisationType { |
|
late int id; |
|
late String description; |
|
|
|
OrganisationType.fromJson(Map<String, dynamic> json) |
|
: this.id = (json['id'] != null ? json['id'] : 0), |
|
this.description = |
|
(json['description'] != null ? json['description'] : ""); |
|
OrganisationType() {} |
|
Map toJson() => {'id': id, 'description': description}; |
|
}
|
|
|