/// FeedbackForm is a data class which stores data fields of Feedback. | |
class FeedbackForm { | |
String name; | |
String email; | |
String mobileNo; | |
String feedback; | |
FeedbackForm(this.name, this.email, this.mobileNo, this.feedback); | |
factory FeedbackForm.fromJson(dynamic json) { | |
return FeedbackForm("${json['name']}", "${json['email']}", | |
"${json['mobileNo']}", "${json['feedback']}"); | |
} | |
// Method to make GET parameters. | |
Map toJson() => { | |
'name': name, | |
'email': email, | |
'mobileNo': mobileNo, | |
'feedback': feedback | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment