class HomeEntity { int status; String msg; Result result; HomeEntity({this.status, this.msg, this.result}); HomeEntity.fromJson(Map json) { status = json['status']; msg = json['msg']; result = json['result'] != null ? new Result.fromJson(json['result']) : null; } Map toJson() { final Map data = new Map(); data['status'] = this.status; data['msg'] = this.msg; if (this.result != null) { data['result'] = this.result.toJson(); } return data; } } class Result { Recommended recommended; Recommended newest; Models model; Result({this.recommended, this.newest, this.model}); Result.fromJson(Map json) { recommended = json['recommended'] != null ? new Recommended.fromJson(json['recommended']) : null; newest = json['newest'] != null ? new Recommended.fromJson(json['newest']) : null; model = json['model'] != null ? new Models.fromJson(json['model']) : null; } Map toJson() { final Map data = new Map(); if (this.recommended != null) { data['recommended'] = this.recommended.toJson(); } if (this.newest != null) { data['newest'] = this.newest.toJson(); } if (this.model != null) { data['model'] = this.model.toJson(); } return data; } } class Recommended { String title; List data; Recommended({this.title, this.data}); Recommended.fromJson(Map json) { title = json['title']; if (json['data'] != null) { data = new List(); json['data'].forEach((v) { data.add(new HomeEntityData.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['title'] = this.title; if (this.data != null) { data['data'] = this.data.map((v) => v.toJson()).toList(); } return data; } } class HomeEntityData { int id; int total; int totalPage; String source; String user; List tags; String title; String preview; HomeEntityData( {this.id, this.total, this.totalPage, this.source, this.user, this.tags, this.title, this.preview}); HomeEntityData.fromJson(Map json) { id = json['id']; total = json['total']; totalPage = json['total_page']; source = json['source']; user = json['user']; if (json['tags'] != null) { tags = new List(); json['tags'].forEach((v) { tags.add(new Tags.fromJson(v)); }); } title = json['title']; preview = json['preview']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['total'] = this.total; data['total_page'] = this.totalPage; data['source'] = this.source; data['user'] = this.user; if (this.tags != null) { data['tags'] = this.tags.map((v) => v.toJson()).toList(); } data['title'] = this.title; data['preview'] = this.preview; return data; } } class Tags { String title; int id; Tags({this.title, this.id}); Tags.fromJson(Map json) { title = json['title']; id = json['id']; } Map toJson() { final Map data = new Map(); data['title'] = this.title; data['id'] = this.id; return data; } } class Models { String title; List res; Models({this.title, this.res}); Models.fromJson(Map json) { title = json['title']; if (json['res'] != null) { res = new List(); json['res'].forEach((v) { res.add(new Res.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['title'] = this.title; if (this.res != null) { data['res'] = this.res.map((v) => v.toJson()).toList(); } return data; } } class Res { int id; String title; String total; String preview; Res({this.id, this.title, this.total, this.preview}); Res.fromJson(Map json) { id = json['id']; title = json['title']; total = json['total']; preview = json['preview']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['title'] = this.title; data['total'] = this.total; data['preview'] = this.preview; return data; } }