// FocusModel.fromJson(json); class FocusModel { List result; FocusModel({this.result}); FocusModel.fromJson(Map json) { if (json['result'] != null) { result = new List(); json['result'].forEach((v) { result.add(new FocusItemModel.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); if (this.result != null) { data['result'] = this.result.map((v) => v.toJson()).toList(); } return data; } } class FocusItemModel { String sId; String title; String status; String pic; String url; FocusItemModel({this.sId, this.title, this.status, this.pic, this.url}); FocusItemModel.fromJson(Map json) { sId = json['_id']; title = json['title']; status = json['status']; pic = json['pic']; url = json['url']; } Map toJson() { final Map data = new Map(); data['_id'] = this.sId; data['title'] = this.title; data['status'] = this.status; data['pic'] = this.pic; data['url'] = this.url; return data; } }