ProInfo.fromJson constructor

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

Implementation

ProInfo.fromJson(Map<String, dynamic> json) {
  if (json["id"] is int) {
    id = json["id"];
  }
  if (json["firebaseId"] is String) {
    firebaseId = json["firebaseId"];
  }
  if (json["username"] is String) {
    username = json["username"];
  }
  if (json["token"] is String) {
    token = json["token"];
  }
  if (json["uniqueId"] is String) {
    uniqueId = json["uniqueId"];
  }
  if (json["firstName"] is String) {
    firstName = json["firstName"];
  }
  if (json["lastName"] is String) {
    lastName = json["lastName"];
  }
  if (json["displayName"] is String) {
    displayName = json["displayName"];
  }
  if (json["website"] is String) {
    website = json["website"];
  }
  if (json["categorie"] is String) {
    categorie = json["categorie"];
  }
  if (json["profession"] is String) {
    profession = json["profession"];
  }
  if (json["rating"] is num) {
    rating = json["rating"];
  }
  if (json["email"] is String) {
    email = json["email"];
  }
  if (json["phone1"] is String) {
    phone1 = json["phone1"];
  }
  if (json["phone2"] is String) {
    phone2 = json["phone2"];
  }
  if (json["street1"] is String) {
    street1 = json["street1"];
  }
  if (json["street2"] is String) {
    street2 = json["street2"];
  }
  if (json["companyName"] is String) {
    companyName = json["companyName"];
  }
  if (json["zip"] is String) {
    zip = json["zip"];
  }
  if (json["city"] is String) {
    city = json["city"];
  }
  if (json["state"] is String) {
    state = json["state"];
  }
  if (json["country"] is String) {
    country = json["country"];
  }
  if (json["countryCode"] is String) {
    countryCode = json["countryCode"];
  }
  if (json["lat"] is double) {
    lat = json["lat"];
  }
  if (json["lng"] is double) {
    lng = json["lng"];
  }
  if (json["colorCode"] is String) {
    colorCode = json["colorCode"];
  }
  if (json["thumbnail"] is String) {
    thumbnail = json["thumbnail"];
  }
  if (json["createdAt"] is int) {
    createdAt = json["createdAt"];
  }
  if (json["signedAt"] is int) {
    signedAt = json["signedAt"];
  }
  if (json["google"] is String) {
    google = json["google"];
  }
  if (json["facebook"] is String) {
    facebook = json["facebook"];
  }
  if (json["twitter"] is String) {
    twitter = json["twitter"];
  }
  if (json["pinterest"] is String) {
    pinterest = json["pinterest"];
  }
  if (json["instagram"] is String) {
    instagram = json["instagram"];
  }
  if (json["linkedin"] is String) {
    linkedin = json["linkedin"];
  }
  if (json["aboutMe"] is String) {
    aboutMe = json["aboutMe"];
  }
  if (json["google2FaFlg"] is int) {
    google2FaFlg = json["google2FaFlg"];
  }
  if (json["google2FaSecretKey"] is String) {
    google2FaSecretKey = json["google2FaSecretKey"];
  }
  if (json["usedStorageSpace"] is int) {
    usedStorageSpace = json["usedStorageSpace"];
  }
  if (json["gender"] is String) {
    gender = json["gender"];
  }
  if (json["ageRange"] is String) {
    ageRange = json["ageRange"];
  }
  if (json["phoneCode"] is String) {
    phoneCode = json["phoneCode"];
  }
  if (json["subscriptionPlanId"] is String) {
    subscriptionPlanId = json["subscriptionPlanId"];
  }
  if (json["allowChat"] is int) {
    allowChat = json["allowChat"];
  }
  if (json["planName"] is String) {
    planName = json["planName"];
  }
  if (json["mainLanguage"] is String) {
    mainLanguage = json["mainLanguage"];
  }
  if (json["interfaceLanguageCode"] is String) {
    interfaceLanguageCode = json["interfaceLanguageCode"];
  }
  if (json["secondaryLanguages"] is List) {
    secondaryLanguages = json["secondaryLanguages"] ?? [];
  }
  if (json["reliability"] is int) {
    reliability = json["reliability"];
  }
  if (json["events"] is int) {
    events = json["events"];
  }
  if (json["organisation"] is String) {
    organisation = json["organisation"];
  }
  if (json["roleName"] is String) {
    roleName = json["roleName"];
  }
  if (json["permissions"] is List) {
    permissions = json["permissions"] ?? [];
  }
  if (json["smsAllowed"] is int) {
    smsAllowed = json["smsAllowed"];
  }
  if (json["freeSms"] is int) {
    freeSms = json["freeSms"];
  }
  if (json["currency"] is String) {
    currency = json["currency"];
  }
  if (json["billingName"] is String) {
    billingName = json["billingName"];
  }
  if (json["vatNumber"] is String) {
    vatNumber = json["vatNumber"];
  }
  if (json["companyNumber"] is String) {
    companyNumber = json["companyNumber"];
  }
  if (json["organisationThumbnail"] is String) {
    organisationThumbnail = json["organisationThumbnail"];
  }
  if (json["timeBeforeStartTracking"] is int) {
    timeBeforeStartTracking = json["timeBeforeStartTracking"];
  }
  if (json["distanceBeforeStartTracking"] is int) {
    distanceBeforeStartTracking = json["distanceBeforeStartTracking"];
  }
  if (json["registerFrom"] is String) {
    registerFrom = json["registerFrom"];
  }
  if (json["isHomelidoAgent"] is int) {
    isHomelidoAgent = json["isHomelidoAgent"];
  }
  if (json["industryId"] is int) {
    industryId = json["industryId"];
  }
  if (json["allowGeolocation"] is int) {
    allowGeolocation = json["allowGeolocation"];
  }
  if (json["dateFormat"] is String) {
    dateFormat = json["dateFormat"];
  }
  if (json["timeFormat"] is String) {
    timeFormat = json["timeFormat"];
  }
  if (json["mainSubcatInfo"] is Map) {
    mainSubcatInfo = json["mainSubcatInfo"] == null
        ? null
        : MainSubcatInfo.fromJson(json["mainSubcatInfo"]);
  }
  if (json["industryName"] is String) {
    industryName = json["industryName"];
  }

  if (json["billingInfos"] is List) {
    billingInfos = (json["billingInfos"] as List)
        .map((e) => PaymentBillingInfo.fromJson(e))
        .toList();
  }
  internalArckipelNote = json["internalArckipelNote"];
  whiseClientId = json["whiseClientId"];
  isTmp = json["isTmp"];
  aboutMeHomelido = json["aboutMeHomelido"];
  tagline = json["tagline"];
  processStatus = json["processStatus"];
  if (json["kisblePublicThumbnailUrl"] is String) {
    kisblePublicThumbnailUrl = json["kisblePublicThumbnailUrl"];
  }

  mqtt = json["mqtt"] == null
      ? null
      : TokenResponseLoginMqtt.fromJson(json["mqtt"]);
  if (json["banner"] != null) {
    banner = CommonMedia.fromJson(json["banner"]);
  }
}