class TestModel { String? tab; int? tabId; String? isPaket; List? items; TestModel({this.tab, this.tabId, this.items, this.isPaket}); TestModel.fromJson(Map json) { tab = json['tab']; tabId = json['tab_id']; isPaket = json['is_paket']; if (json['items'] != null) { items = []; json['items'].forEach((v) { items!.add(Items.fromJson(v)); }); } } Map toJson() { final Map data = {}; data['tab'] = tab; data['tab_id'] = tabId; data['is_paket'] = isPaket; if (items != null) { data['items'] = items!.map((v) => v.toJson()).toList(); } return data; } } class Items { String? testID; String? testName; String? testPrice; String? sasCode; String? isPaket; String? arrTest; String? type; bool value = false; Items( {this.testID, this.testName, this.testPrice, this.isPaket, this.arrTest, this.type, this.value = false, this.sasCode}); Items.fromJson(Map json) { testID = json['testID']; testName = json['testName']; testPrice = json['testPrice'].toString(); sasCode = json['sasCode']; isPaket = json['is_paket']; arrTest = json['arrTest']; type = json['type']; value = false; } Map toJson() { final Map data = {}; data['testID'] = testID; data['testName'] = testName; data['testPrice'] = testPrice; data['sasCode'] = sasCode; data['is_paket'] = isPaket; data['arrTest'] = arrTest; data['type'] = type; data['value'] = value; return data; } }