Skip to content

Instantly share code, notes, and snippets.

@DK15
Created October 19, 2018 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DK15/e2c65dfb780b27c722cb5b6314ba894b to your computer and use it in GitHub Desktop.
Save DK15/e2c65dfb780b27c722cb5b6314ba894b to your computer and use it in GitHub Desktop.
PODO
class Review {
final int rating;
final String review;
final String created;
final String fullName;
final String city;
final String state;
final String profilePicURL;
Review({this.rating, this.review, this.created, this.fullName, this.city, this.state, this.profilePicURL});
factory Review.fromJSON(List list, int index) {
return Review(
rating: list[index]['Rating'] as int,
review: list[index]['Review'] as String,
created: list[index]['Created'] as String,
fullName: list[index]['FullName'] as String,
city: list[index]['City'] as String,
state: list[index]['State'] as String,
profilePicURL: list[index]['profile_pic'] as String,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment