CardMessage.fromJson constructor

CardMessage.fromJson(
  1. Map _json
)

Implementation

CardMessage.fromJson(core.Map _json)
    : this(
        backgroundHexColor: _json.containsKey('backgroundHexColor')
            ? _json['backgroundHexColor'] as core.String
            : null,
        body: _json.containsKey('body')
            ? Text.fromJson(
                _json['body'] as core.Map<core.String, core.dynamic>)
            : null,
        landscapeImageUrl: _json.containsKey('landscapeImageUrl')
            ? _json['landscapeImageUrl'] as core.String
            : null,
        portraitImageUrl: _json.containsKey('portraitImageUrl')
            ? _json['portraitImageUrl'] as core.String
            : null,
        primaryAction: _json.containsKey('primaryAction')
            ? Action.fromJson(
                _json['primaryAction'] as core.Map<core.String, core.dynamic>)
            : null,
        primaryActionButton: _json.containsKey('primaryActionButton')
            ? Button.fromJson(_json['primaryActionButton']
                as core.Map<core.String, core.dynamic>)
            : null,
        secondaryAction: _json.containsKey('secondaryAction')
            ? Action.fromJson(_json['secondaryAction']
                as core.Map<core.String, core.dynamic>)
            : null,
        secondaryActionButton: _json.containsKey('secondaryActionButton')
            ? Button.fromJson(_json['secondaryActionButton']
                as core.Map<core.String, core.dynamic>)
            : null,
        title: _json.containsKey('title')
            ? Text.fromJson(
                _json['title'] as core.Map<core.String, core.dynamic>)
            : null,
      );