class TestData { String? id; String? title; int? type; String? disclaimer; List? questionList; TestData( {this.id, this.title, this.type, this.disclaimer, this.questionList}); TestData.fromJson(Map json) { id = json['id']; title = json['title']; type = json['type']; disclaimer = json['disclaimer']; if (json['questionList'] != null) { questionList = []; json['questionList'].forEach((v) { questionList!.add(new QuestionList.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['title'] = this.title; data['type'] = this.type; data['disclaimer'] = this.disclaimer; if (this.questionList != null) { data['questionList'] = this.questionList!.map((v) => v.toJson()).toList(); } return data; } } class QuestionList { String? id; String? title; int? sort; List? optionList; QuestionList({this.id, this.title, this.sort, this.optionList}); QuestionList.fromJson(Map json) { id = json['id']; title = json['title']; sort = json['sort']; if (json['optionList'] != null) { optionList = []; json['optionList'].forEach((v) { optionList!.add(new OptionList.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['title'] = this.title; data['sort'] = this.sort; if (this.optionList != null) { data['optionList'] = this.optionList!.map((v) => v.toJson()).toList(); } return data; } } class OptionList { String? id; String? text; int? sort; OptionList({this.id, this.text, this.sort}); OptionList.fromJson(Map json) { id = json['id']; text = json['text']; sort = json['sort']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['text'] = this.text; data['sort'] = this.sort; return data; } }