import 'package:job_app/models/CvModel.dart'; import 'package:job_app/models/Cvsubmitedmodel.dart'; import 'package:job_app/models/user/user.dart'; class CvModel { String color; List cvmodel; int font; int id; String intro; List language; List experiences; String motivationletter; String name; List skill; int timestmp; List training; UserModel usercv; CvModel({ this.color, this.cvmodel, this.font, this.id, this.intro, this.experiences, this.language, this.motivationletter, this.name, this.skill, this.timestmp, this.training, this.usercv }); factory CvModel.fromJson(Map json) => CvModel( color: json["color"], cvmodel: json["cvmodel"]!=null?List.from(json["cvmodel"].map((x)=>CvModelModel.fromJson(x))):null, font: json["font"], id: json["id"], intro: json["intro"], experiences: List.from(json["experiences"].map((x)=>x)), language: List.from(json["language"].map((x)=>x)), motivationletter: json["motivationletter"], name: json["name"], skill: List.from(json["skill"].map((x) => x)), timestmp: json["timestmp"], training: List.from(json["training"].map((x) => x)), usercv : json["user"]!=null?UserModel.fromJson(json["user"]):null, ); Map toJson() => { "color": color, "cvmodel": List.from(cvmodel.map((e) => e)), "font": font, "id": id, "intro": intro, "experiences": List.from(experiences.map((x) => x)), "language": List.from(language.map((x) => x)), "motivationletter": motivationletter, "name": name, "skill": List.from(skill.map((x) => x)), "timestmp": timestmp, "training": List.from(training.map((x) => x)), "usercv": usercv, }; }