class InstructorModel { InstructorModel({ this.status, this.error, required this.data, }); final int? status; final bool? error; final List data; factory InstructorModel.fromJson(Map json) => InstructorModel( status: json["status"], error: json["error"], data: List.from( json["data"].map((x) => DataInstructor.fromJson(x))), ); Map toJson() => { "status": status, "error": error, "data": List.from(data.map((x) => x.toJson())), }; } class DataInstructor { DataInstructor({ this.instructorName, this.totalReview, this.totalCourse, this.totalStudents, }); final String? instructorName; final String? totalReview; final String? totalCourse; final String? totalStudents; factory DataInstructor.fromJson(Map json) => DataInstructor( instructorName: json["instructor_name"], totalReview: json["total_review"], totalCourse: json["total_course"], totalStudents: json["total_students"], ); Map toJson() => { "instructor_name": instructorName, "total_review": totalReview, "total_course": totalCourse, "total_students": totalStudents, }; }