Location.fromJson constructor

Location.fromJson(
  1. Map json_
)

Implementation

Location.fromJson(core.Map json_)
    : this(
        adWordsLocationExtensions:
            json_.containsKey('adWordsLocationExtensions')
                ? AdWordsLocationExtensions.fromJson(
                    json_['adWordsLocationExtensions']
                        as core.Map<core.String, core.dynamic>)
                : null,
        categories: json_.containsKey('categories')
            ? Categories.fromJson(
                json_['categories'] as core.Map<core.String, core.dynamic>)
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        languageCode: json_.containsKey('languageCode')
            ? json_['languageCode'] as core.String
            : null,
        latlng: json_.containsKey('latlng')
            ? LatLng.fromJson(
                json_['latlng'] as core.Map<core.String, core.dynamic>)
            : null,
        metadata: json_.containsKey('metadata')
            ? Metadata.fromJson(
                json_['metadata'] as core.Map<core.String, core.dynamic>)
            : null,
        moreHours: json_.containsKey('moreHours')
            ? (json_['moreHours'] as core.List)
                .map((value) => MoreHours.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        openInfo: json_.containsKey('openInfo')
            ? OpenInfo.fromJson(
                json_['openInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        phoneNumbers: json_.containsKey('phoneNumbers')
            ? PhoneNumbers.fromJson(
                json_['phoneNumbers'] as core.Map<core.String, core.dynamic>)
            : null,
        profile: json_.containsKey('profile')
            ? Profile.fromJson(
                json_['profile'] as core.Map<core.String, core.dynamic>)
            : null,
        regularHours: json_.containsKey('regularHours')
            ? BusinessHours.fromJson(
                json_['regularHours'] as core.Map<core.String, core.dynamic>)
            : null,
        relationshipData: json_.containsKey('relationshipData')
            ? RelationshipData.fromJson(json_['relationshipData']
                as core.Map<core.String, core.dynamic>)
            : null,
        serviceArea: json_.containsKey('serviceArea')
            ? ServiceAreaBusiness.fromJson(
                json_['serviceArea'] as core.Map<core.String, core.dynamic>)
            : null,
        serviceItems: json_.containsKey('serviceItems')
            ? (json_['serviceItems'] as core.List)
                .map((value) => ServiceItem.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        specialHours: json_.containsKey('specialHours')
            ? SpecialHours.fromJson(
                json_['specialHours'] as core.Map<core.String, core.dynamic>)
            : null,
        storeCode: json_.containsKey('storeCode')
            ? json_['storeCode'] as core.String
            : null,
        storefrontAddress: json_.containsKey('storefrontAddress')
            ? PostalAddress.fromJson(json_['storefrontAddress']
                as core.Map<core.String, core.dynamic>)
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        websiteUri: json_.containsKey('websiteUri')
            ? json_['websiteUri'] as core.String
            : null,
      );