Post.fromJson constructor

Post.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Post.fromJson(Map<String, dynamic> json) {
  return Post(
    userId: json['userId'],
    id: json['id'],
    title: json['title'],
    body: json['body'],
  );
}