class HotTopicModel { int id; String name; HotTopicModel({this.id, this.name}); HotTopicModel.fromJson(Map json) { id = json['id']; name = json['name']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; return data; } }