ThickContent.fromJson constructor

ThickContent.fromJson(
  1. Map _json
)

Implementation

ThickContent.fromJson(core.Map _json)
    : this(
        content: _json.containsKey('content')
            ? Content.fromJson(
                _json['content'] as core.Map<core.String, core.dynamic>)
            : null,
        dataBundle: _json.containsKey('dataBundle')
            ? (_json['dataBundle'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        experimentalPayload: _json.containsKey('experimentalPayload')
            ? ExperimentalCampaignPayload.fromJson(
                _json['experimentalPayload']
                    as core.Map<core.String, core.dynamic>)
            : null,
        isTestCampaign: _json.containsKey('isTestCampaign')
            ? _json['isTestCampaign'] as core.bool
            : null,
        priority: _json.containsKey('priority')
            ? Priority.fromJson(
                _json['priority'] as core.Map<core.String, core.dynamic>)
            : null,
        triggeringConditions: _json.containsKey('triggeringConditions')
            ? (_json['triggeringConditions'] as core.List)
                .map((value) => TriggeringCondition.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        vanillaPayload: _json.containsKey('vanillaPayload')
            ? VanillaCampaignPayload.fromJson(_json['vanillaPayload']
                as core.Map<core.String, core.dynamic>)
            : null,
      );