class LiveMainModel { List? module; List? recom; LiveMainModel({this.module, this.recom}); LiveMainModel.fromJson(Map json) { if (json['module'] != null) { module = []; json['module'].forEach((v) { module!.add(new LiveModule.fromJson(v)); }); } if (json['recom'] != null) { recom = []; json['recom'].forEach((v) { recom!.add(new LiveRecom.fromJson(v)); }); } } } class LiveModule { String? id; String? title; LiveModule({this.id, this.title}); LiveModule.fromJson(Map json) { id = json['id']; title = json['title']; } } class LiveRecom { List? anchors; String? recoShowType; LiveRecom({this.anchors, this.recoShowType}); LiveRecom.fromJson(Map json) { if (json['anchors'] != null) { anchors = []; json['anchors'].forEach((v) { anchors!.add(new LiveAnchor.fromJson(v)); }); } recoShowType = json['recoShowType']; } } class LiveAnchor { String? id; String? name; String? coverImg; String? url; String? country; int? vidWidth; int? vidHeight; bool? isOnline; bool? isNew; int? viewCount; LiveAnchor( {this.id, this.name, this.coverImg, this.url, this.country, this.vidWidth, this.vidHeight, this.isOnline, this.isNew, this.viewCount}); LiveAnchor.fromJson(Map json) { id = json['id']; name = json['name']; coverImg = json['coverImg']; url = json['url']; country = json['country']; vidWidth = json['vidWidth']; vidHeight = json['vidHeight']; isOnline = json['isOnline']; isNew = json['isNew']; viewCount = json['viewCount']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; data['coverImg'] = this.coverImg; data['url'] = this.url; data['country'] = this.country; data['vidWidth'] = this.vidWidth; data['vidHeight'] = this.vidHeight; data['isOnline'] = this.isOnline; data['isNew'] = this.isNew; data['viewCount'] = this.viewCount; return data; } }