Policy.fromJson constructor

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

Implementation

factory Policy.fromJson(Map<String, dynamic> json) => Policy(
      body: json["body"],
      createdAt: json["created_at"] == null
          ? null
          : DateTime.parse(json["created_at"]),
      updatedAt: json["updated_at"] == null
          ? null
          : DateTime.parse(json["updated_at"]),
      handle: json["handle"],
      title: json["title"],
      url: json["url"],
    );