NotificationModel.fromJson constructor

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

Implementation

factory NotificationModel.fromJson(Map<String, dynamic> json) =>
    NotificationModel(
      id: json["id"],
      userId: json["user_id"],
      type: json["type"],
      name: json["name"],
      url: json["url"],
      checkedDate: json["checked_date"],
      createdAt: DateTime.parse(json["created_at"]),
      updatedAt: DateTime.parse(json["updated_at"]),
      notificationMessages: List<NotificationMessageModel>.from(
          json["notification_messages"]
              .map((x) => NotificationMessageModel.fromJson(x))),
    );