class PopularMangaModelComick { int? id; String? hid; String? slug; String? title; String? rating; String? bayesianRating; int? ratingCount; int? followCount; String? desc; double? lastChapter; bool? translationCompleted; int? viewCount; String? contentRating; int? demographic; List? genres; int? userFollowCount; int? year; List? mdTitles; List? mdCovers; MuComics? muComics; String? coverUrl; PopularMangaModelComick( {this.id, this.hid, this.slug, this.title, this.rating, this.bayesianRating, this.ratingCount, this.followCount, this.desc, this.lastChapter, this.translationCompleted, this.viewCount, this.contentRating, this.demographic, this.genres, this.userFollowCount, this.year, this.mdTitles, this.mdCovers, this.muComics, this.coverUrl}); PopularMangaModelComick.fromJson(Map json) { id = json['id']; hid = json['hid']; slug = json['slug']; title = json['title']; rating = json['rating']; bayesianRating = json['bayesian_rating']; ratingCount = json['rating_count']; followCount = json['follow_count']; desc = json['desc']; lastChapter = double.parse(json['last_chapter'].toString()); translationCompleted = json['translation_completed']; viewCount = json['view_count']; contentRating = json['content_rating']; demographic = json['demographic']; genres = json['genres'].cast(); userFollowCount = json['user_follow_count']; year = json['year']; if (json['md_titles'] != null) { mdTitles = []; json['md_titles'].forEach((v) { mdTitles!.add(MdTitles.fromJson(v)); }); } if (json['md_covers'] != null) { mdCovers = []; json['md_covers'].forEach((v) { mdCovers!.add(MdCovers.fromJson(v)); }); } muComics = json['mu_comics'] != null ? MuComics.fromJson(json['mu_comics']) : null; coverUrl = json['cover_url']; } } class MdTitles { String? title; MdTitles({this.title}); MdTitles.fromJson(Map json) { title = json['title']; } Map toJson() { final Map data = {}; data['title'] = title; return data; } } class MdCovers { int? w; int? h; String? b2key; MdCovers({this.w, this.h, this.b2key}); MdCovers.fromJson(Map json) { w = json['w']; h = json['h']; b2key = json['b2key']; } Map toJson() { final Map data = {}; data['w'] = w; data['h'] = h; data['b2key'] = b2key; return data; } } class MuComics { int? year; MuComics({this.year}); MuComics.fromJson(Map json) { year = json['year']; } }