PostReponse.fromJson constructor

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

Implementation

factory PostReponse.fromJson(Map<String, dynamic> json) => PostReponse(
      page: json['page'],
      posts: (json['posts'] as List<dynamic>?)
          ?.map((e) => Post.fromJson(e as Map<String, dynamic>))
          .toList(),
    );