class MyCertificateModel { MyCertificateModel({ this.status, this.error, required this.data, }); final int? status; final bool? error; final List> data; factory MyCertificateModel.fromJson(Map json) => MyCertificateModel( status: json["status"], error: json["error"], data: List>.from(json["data"].map((x) => List.from( x.map((x) => DataMyCertificateModel.fromJson(x))))), ); Map toJson() => { "status": status, "error": error, "data": List.from( data.map((x) => List.from(x.map((x) => x.toJson())))), }; } class DataMyCertificateModel { String? courseId; String? instructorId; String? name; String? title; String? instructor; String? certificateNo; int? progress; String? fotoProfile; String? idPayment; DataMyCertificateModel({ this.courseId, this.instructorId, this.name, this.title, this.instructor, this.certificateNo, this.progress, this.fotoProfile, this.idPayment, }); DataMyCertificateModel.fromJson(Map json) { courseId = json['course_id']; instructorId = json['instructor_id']; name = json['name']; title = json['title']; instructor = json['instructor']; certificateNo = json['certificate_no']; progress = json['progress']; fotoProfile = json['foto_profile']; idPayment = json['id_payment']; } Map toJson() { final Map data = new Map(); data['course_id'] = this.courseId; data['instructor_id'] = this.instructorId; data['name'] = this.name; data['title'] = this.title; data['instructor'] = this.instructor; data['certificate_no'] = this.certificateNo; data['progress'] = this.progress; data['foto_profile'] = this.fotoProfile; data['id_payment'] = this.idPayment; return data; } }