ProjectList.fromJson constructor

ProjectList.fromJson(
  1. dynamic json
)

Implementation

ProjectList.fromJson(dynamic json) {
  _shareUrl = json['share_url'] != null ? ShareUrl.fromJson(json['share_url']) : null;
  _projectId = json['project_id'];
  _projectName = json['project_name'];
  _slug = json['slug'];
  _projectTitle = json['project_title'];
  _masterUserName = json['master_user_name'];
  _projectTitleSmall = json['project_title_small'];
  _projectContactNo = json['project_contact_no'];
  _projectType = json['project_type'];
  _otherSpacesName = json['other_spaces_name'];
  _location = json['location'];
  _minPrice = json['min_price'];
  _minPriceNumber = json['min_price_number'];
  _minPriceType = json['min_price_type'];
  _maxPrice = json['max_price'];
  _sqftMinArea = json['sqft_min_area'];
  _sqftMaxArea = json['sqft_max_area'];
  _sizePrice = json['size_price'];
  _availableUnit = json['available_unit'];
  _noOfUnit = json['no_of_unit'];
  _sqftType = json['sqft_type'];
  _reraNumber = json['rera_number'];
  _image = json['image'];
  _imageFull = json['image_full'];
  //_bannerList = json['banner_list'];
  _pageTitle = json['page_title'];
  _locationTitle = json['location_title'];
  _locationTagLine = json['location_tag_line'];
  _pageDescription = json['page_description'];
  _pageKeywords = json['page_keywords'];
  _pageImage = json['page_image'];
  _pageImageUpload = json['page_image_upload'];
  _pageImageFull = json['page_image_full'];
  _overviewTitle = json['overview_title'];
  _description = json['description'];
  _descriptionPain = json['description_pain'];
  _bigText = json['big_text'];
  _bigTextPain = json['big_text_pain'];
  _summary = json['summary'];
  _amenitiesDescription = json['amenities_description'];
  _amenitiesTitle = json['amenities_title'];
  _amenitiesTagline = json['amenities_tagline'];
  _amenitiesImage = json['amenities_image'];
  _whatsappLink = json['whatsapp_link'];
  _whatsappDescription = json['whatsapp_description'];
  ///_otherProjectId = json['other_project_id'];
  _mapSlug = json['map_slug'];
  _mapIframe = json['map_iframe'];
  _mapSortDescription = json['map_sort_description'];
  _mapImage = json['map_image'];
  _mapImageFull = json['map_image_full'];
  _projectLogo = json['project_logo'];
  _projectLogoFull = json['project_logo_full'];
  _inquiryImage = json['inquiry_image'];
  _inquiryImageFull = json['inquiry_image_full'];
  _locationDescription = json['location_description'];
  _addressDescription = json['address_description'];
  //_sort = json['sort'];
  _isActive = json['is_active'];
  _createdAt = json['created_at'];
  _createdTime = json['created_time'];
  _updatedAt = json['updated_at'];
  _updatedTime = json['updated_time'];
  _downloadTitle = json['download_title'];
  _downloadTagLine = json['download_tag_line'];
  _highlightsName = json['highlights_name'];
  _highlightsTagLine = json['highlights_tag_line'];
  _isFavoriteMark = json['is_favorite_mark'];
  _highlightsDescription = json['highlights_description'];
  if (json['other_projects'] != null) {
    _otherProjects = [];
    json['other_projects'].forEach((v) {
      _otherProjects?.add(OtherProjects.fromJson(v));
    });
  }

  if (json['inquiry_types'] != null) {
    _inquiryTypes = [];
    json['inquiry_types'].forEach((v) {
      _inquiryTypes?.add(InquiryTypes.fromJson(v));
    });
  }

  _projectCategoryId = json['project_category_id'];
  _categoryId = json['category_id'];
  _category = json['category'];
  _construction = json['construction'] != null ? Construction.fromJson(json['construction']) : null;
  _constructionData2 = json['construction_data_2'] != null ? ConstructionData2.fromJson(json['construction_data_2']) : null;
  _projectStatusId = json['project_status_id'];
  _statusId = json['status_id'];
  _status = json['status'];
  if (json['document_other_data'] != null) {
    _documentOtherData = [];
    json['document_other_data'].forEach((v) {
      _documentOtherData?.add(DocumentOtherData.fromJson(v));
    });
  }
  if (json['gallery_data'] != null) {
    _galleryData = [];
    json['gallery_data'].forEach((v) {
      _galleryData?.add(GalleryData.fromJson(v));
    });
  }
  if (json['virtual_data'] != null) {
    _virtualData = [];
    json['virtual_data'].forEach((v) {
      _virtualData?.add(VirtualData.fromJson(v));
    });
  }
  if (json['amenities_data'] != null) {
    _amenitiesData = [];
    json['amenities_data'].forEach((v) {
      _amenitiesData?.add(AmenitiesData.fromJson(v));
    });
  }
  _amenitiesArray = json['amenities_array'] != null ? json['amenities_array'].cast<num>() : [];
  if (json['highlights'] != null) {
    _highlights = [];
    json['highlights'].forEach((v) {
      _highlights?.add(Highlights.fromJson(v));
    });
  }
  if (json['amenities_images'] != null) {
    _amenitiesImages = [];
    json['amenities_images'].forEach((v) {
      _amenitiesImages?.add(AmenitiesImages.fromJson(v));
    });
  }
  _bannerData = json['banner_data'] != null ? BannerData.fromJson(json['banner_data']) : null;
  _totalInquiries = json['total_inquiries'];
  if (json['campaign_array'] != null) {
    _campaignArray = [];
    json['campaign_array'].forEach((v) {
      _campaignArray?.add(CampaignArray.fromJson(v));
    });
  }
}