HomelidoPropertyInfo.fromJson constructor

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

Implementation

HomelidoPropertyInfo.fromJson(Map<String, dynamic> json) {
  if (json["id"] is int) {
    id = json["id"];
  }
  if (json["title"] is String) {
    title = json["title"];
  }
  if (json["image"] is String) {
    image = json["image"];
  }
  if (json["address"] is String) {
    address = json["address"];
  }
  if (json["price"] is double) {
    price = json["price"];
  }
  if (json["salePrice"] is double) {
    salePrice = json["salePrice"];
  }
  if (json["bed"] is int) {
    bed = json["bed"];
  }
  if (json["bedrooms"] is int) {
    bedrooms = json["bedrooms"];
  }
  if (json["area"] is int) {
    area = json["area"];
  }
  if (json["areaUnit"] is String) {
    areaUnit = json["areaUnit"];
  }
  if (json["bathroom"] is int) {
    bathroom = json["bathroom"];
  }
  if (json["currency"] is String) {
    currency = json["currency"];
  }
  if (json["availableFrom"] is String) {
    availableFrom = json["availableFrom"];
  }
  if (json["propertyType"] is int) {
    propertyType = json["propertyType"];
  }
  if (json["content"] is String) {
    content = json["content"];
  }
  if (json["bannerImage"] is String) {
    bannerImage = json["bannerImage"];
  }
  if (json["lat"] is double) {
    lat = json["lat"];
  }
  if (json["lng"] is double) {
    lng = json["lng"];
  }
  if (json["isFeatured"] is int) {
    isFeatured = json["isFeatured"];
  }
  if (json["gallery"] is List) {
    gallery =
        json["gallery"] == null ? null : List<String>.from(json["gallery"]);
  }
  if (json["video"] is String) {
    video = json["video"];
  }
  if (json["square"] is int) {
    square = json["square"];
  }
  if (json["garages"] is int) {
    garages = json["garages"];
  }
  if (json["deposit"] is String) {
    deposit = json["deposit"];
  }
  if (json["poolSize"] is String) {
    poolSize = json["poolSize"];
  }
  if (json["status"] is String) {
    status = json["status"];
  }
  if (json["defaultState"] is int) {
    defaultState = json["defaultState"];
  }
  if (json["view"] is int) {
    view = json["view"];
  }
  if (json["recentView"] is String) {
    recentView = json["recentView"];
  }
  if (json["isSold"] is int) {
    isSold = json["isSold"];
  }
  if (json["placeId"] is int) {
    placeId = json["placeId"];
  }
  if (json["adLanguageCode"] is String) {
    adLanguageCode = json["adLanguageCode"];
  }
  if (json["energyLabel"] is String) {
    energyLabel = json["energyLabel"];
  }
  if (json["energyPictureUrl"] is String) {
    energyPictureUrl = json["energyPictureUrl"];
  }
  if (json["energyId"] is int) {
    energyId = json["energyId"];
  }
  if (json["qrCode"] is String) {
    qrCode = json["qrCode"];
  }
  if (json["isFeaturedUntil"] is int) {
    isFeaturedUntil = json["isFeaturedUntil"];
  }
  if (json["isPublishedUntil"] is int) {
    isPublishedUntil = json["isPublishedUntil"];
  }
  if (json["owner"] is Map) {
    owner = json["owner"] == null ? null : Owner.fromJson(json["owner"]);
  }
  if (json["category"] is Map) {
    category =
        json["category"] == null ? null : Category.fromJson(json["category"]);
  }
  if (json["logoAgency"] is String) {
    logoAgency = json["logoAgency"];
  }
  if (json["countryCode"] is String) {
    countryCode = json["countryCode"];
  }
  if (json["countryName"] is String) {
    countryName = json["countryName"];
  }
  if (json["timeSlide"] is int) {
    timeSlide = json["timeSlide"];
  }
}