class SectionLessonModel { SectionLessonModel({ this.status, this.error, this.data, }); final int? status; final bool? error; final List>? data; factory SectionLessonModel.fromJson(Map json) => SectionLessonModel( status: json["status"], error: json["error"], data: List>.from(json["data"].map((x) => List.from( x.map((x) => SectionLessonList.fromJson(x))))), ); Map toJson() => { "status": status, "error": error, "data": List.from( data!.map((x) => List.from(x.map((x) => x.toJson())))), }; } class SectionLessonList { SectionLessonList({ this.title, this.duration, this.dataLesson, }); final String? title; final String? duration; final List>? dataLesson; factory SectionLessonList.fromJson(Map json) => SectionLessonList( title: json["title"], duration: json["duration"] == null ? null : json["duration"], dataLesson: List>.from(json["data_lesson"].map((x) => List.from(x.map((x) => DataLesson.fromJson(x))))), ); Map toJson() => { "title": title, "duration": duration == null ? null : duration, "data_lesson": List.from(dataLesson! .map((x) => List.from(x.map((x) => x.toJson())))), }; } class DataLesson { DataLesson( {this.titleLesson, this.duration, this.lessonType, this.attachment}); final String? titleLesson; final String? duration; final String? lessonType; final String? attachment; factory DataLesson.fromJson(Map json) => DataLesson( titleLesson: json["title_lesson"], duration: json["duration"], lessonType: json["lesson_type"], attachment: json["attachment"], ); Map toJson() => { "title_lesson": titleLesson, "duration": duration, "lesson_type": lessonType, "attachment": attachment, }; }