Last active
July 4, 2020 07:35
-
-
Save PatilShreyas/55fe1d9fe409e38e8677171bbe0a4ff7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 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