class TesoBusinessDetail { String businessId; String handle; String businessName; String businessTin; String businessDescription; String businessCategory; String businessAddress; String businessContact; String businessLogo; DateTime dateOfEst; String businessEmail; String businessLat; String businessLng; TesoBusinessDetail( {this.businessId, this.businessAddress, this.businessCategory, this.businessContact, this.businessDescription, this.businessEmail, this.businessLat, this.businessLng, this.businessLogo, this.businessName, this.businessTin, this.dateOfEst, this.handle}); TesoBusinessDetail.fromJSON(Map json) : businessId = json['businessId'], businessAddress = json['businessAddress'], businessCategory = json['businessCategory'], businessContact = json['businessContact'], businessDescription = json['businessDescription'], businessEmail = json['businessEmail'], businessLat = json['businessLat'], businessLng = json['businessLng'], businessLogo = json['businessLogo'], businessName = json['businessName'], businessTin = json['businessTin'], dateOfEst = DateTime.tryParse((json['dateOfEst']).toString()), handle = json['handle']; Map toJson() { final Map data = Map(); data['businessId'] = this.businessId; data['businessAddress'] = this.businessAddress; data['businessCategory'] = this.businessCategory; data['businessContact'] = this.businessContact; data['businessDescription'] = this.businessDescription; data['businessEmail'] = this.businessEmail; data['businessLat'] = this.businessLat; data['businessLng'] = this.businessLng; data['businessLogo'] = this.businessLogo; data['businessName'] = this.businessName; data['businessTin'] = this.businessTin; data['dateOfEst'] = this.dateOfEst.toIso8601String(); data['handle'] = this.handle; return data; } @override String toString() { return '{"businessId": "$businessId","businessAddress": "$businessAddress", "businessCategory": "$businessCategory","businessContact": "$businessContact",' + '"businessDescription": "$businessDescription", "businessEmail": "$businessEmail", "businessLat": "$businessLat","businessLng": "$businessLng","businessLogo":' + '"$businessLogo","businessName": "$businessName","businessTin": "$businessTin","dateOfEst": "$dateOfEst","handle": "$handle"}'; } }