FetchRemoteConfigResponse.fromJson constructor

FetchRemoteConfigResponse.fromJson(
  1. Map _json
)

Implementation

FetchRemoteConfigResponse.fromJson(core.Map _json)
    : this(
        appName: _json.containsKey('appName')
            ? _json['appName'] as core.String
            : null,
        entries: _json.containsKey('entries')
            ? (_json['entries'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        experimentDescriptions: _json.containsKey('experimentDescriptions')
            ? (_json['experimentDescriptions'] as core.List)
                .map((value) => ExperimentDescription.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        personalizationMetadata: _json.containsKey('personalizationMetadata')
            ? (_json['personalizationMetadata']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  PersonalizationMetadata.fromJson(
                      item as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        state:
            _json.containsKey('state') ? _json['state'] as core.String : null,
        templateVersion: _json.containsKey('templateVersion')
            ? _json['templateVersion'] as core.String
            : null,
      );