PostTypes.fromJson constructor

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

Implementation

PostTypes.fromJson(Map<String, dynamic> json) {
  post =
      json['post'] != null ? new PostTypePost.fromJson(json['post']) : null;
  page =
      json['page'] != null ? new PostTypePage.fromJson(json['page']) : null;
  attachment = json['attachment'] != null
      ? new Attachment.fromJson(json['attachment'])
      : null;
  wpBlock = json['wp_block'] != null
      ? new WpBlock.fromJson(json['wp_block'])
      : null;
}