Ticket.fromJson constructor

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

Implementation

Ticket.fromJson(Map<String, dynamic> json) {
  if (json["ticket"] is Map) {
    ticket = json["ticket"] == null ? null : Ticket1.fromJson(json["ticket"]);
  }
  if (json["agent"] is List) {
    agent = json["agent"] ?? [];
  }
  if (json["customer"] is Map) {
    customer =
        json["customer"] == null ? null : Customer.fromJson(json["customer"]);
  }
  if (json["product"] is Map) {
    product =
        json["product"] == null ? null : Product.fromJson(json["product"]);
  }
  if (json["place"] is Map) {
    place = json["place"] == null ? null : Place.fromJson(json["place"]);
  }
  if (json["status"] is Map) {
    status = json["status"] == null ? null : Status1.fromJson(json["status"]);
  }
  if (json["problemType"] is Map) {
    problemType = json["problemType"] == null
        ? null
        : _ProblemType.fromJson(json["problemType"]);
  }
  if (json["platformId"] is int) {
    platformId = json["platformId"];
  }
  if (json["answer"] is Map) {
    answer = json["answer"] == null ? null : Answer.fromJson(json["answer"]);
  }
}