class LessonModel { LessonModel({ required this.lesssonId, required this.title, required this.duration, this.videoType, this.videoUrl, this.attachmentType, this.attachment, required this.attachmentDownload, required this.isSkip, required this.progressVideo, required this.isFinished, required this.summary, }); final String lesssonId; final String title; final String duration; String? videoType; String? videoUrl; String? attachmentType; String? attachment; final bool attachmentDownload; final String isSkip; final String progressVideo; final int isFinished; final String summary; factory LessonModel.fromJson(Map json) => LessonModel( lesssonId: json["lesson_id"], title: json["title"], duration: json["duration"], videoType: json["video_type"], videoUrl: json["video_url"], attachmentType: json["attachment_type"], attachment: json["attachment"], attachmentDownload: json["attachment_download"], isSkip: json["is_skip"], progressVideo: json["progress_video"], isFinished: json["is_finished"], summary: json["summary"], ); Map toJson() => { "lesson_id": lesssonId, "title": title, "duration": duration, "video_type": videoType, "video_url": videoUrl, "attachment_type": attachmentType, "attachment": attachment, "attachment_download": attachmentDownload, "is_skip": isSkip, "progress_video": progressVideo, "is_finished": isFinished, "summary": summary, }; }