class DataDiriModel { DataDiriModel({ this.status, this.error, required this.data, }); int? status; bool? error; List data; factory DataDiriModel.fromJson(Map json) => DataDiriModel( status: json["status"], error: json["error"], data: List.from( json["data"].map((x) => DataOfDataDiriModel.fromJson(x))), ); Map toJson() => { "status": status, "error": error, "data": List.from(data.map((x) => x.toJson())), }; } class DataOfDataDiriModel { DataOfDataDiriModel({ this.idUser, this.fullname, this.headline, this.biography, this.datebirth, this.email, this.phone, this.gender, this.socialLink, }); String? idUser; String? fullname; String? headline; String? biography; String? datebirth; String? email; String? phone; String? gender; SocialLink? socialLink; factory DataOfDataDiriModel.fromJson(Map json) => DataOfDataDiriModel( idUser: json["id_user"], fullname: json["full_name"], headline: json["headline"], biography: json["biography"], datebirth: json["datebirth"], email: json["email"], phone: json["phone"], gender: json["jenis_kelamin"] == null ? '' : json["jenis_kelamin"], socialLink: json["social_link"] == null ? null : SocialLink.fromJson(json["social_link"]), ); Map toJson() => { "id_user": idUser, "full_name": fullname, "headline": headline, "biography": biography, "datebirth": datebirth, "email": email, "phone": phone, "jenis_kelamin": gender, "social_link": socialLink == null ? null : socialLink!.toJson(), }; } class SocialLink { SocialLink({ this.facebook, this.twitter, this.instagram, this.linkedin, }); String? facebook; String? twitter; String? instagram; String? linkedin; factory SocialLink.fromJson(Map json) => SocialLink( facebook: json["facebook"], twitter: json["twitter"], instagram: json["instagram"], linkedin: json["linkedin"], ); Map toJson() => { "facebook": facebook, "twitter": twitter, "instagram": instagram, "linkedin": linkedin, }; }