Content.fromJson constructor

Content.fromJson(
  1. Map _json
)

Implementation

Content.fromJson(core.Map _json)
    : this(
        banner: _json.containsKey('banner')
            ? BannerMessage.fromJson(
                _json['banner'] as core.Map<core.String, core.dynamic>)
            : null,
        card: _json.containsKey('card')
            ? CardMessage.fromJson(
                _json['card'] as core.Map<core.String, core.dynamic>)
            : null,
        imageOnly: _json.containsKey('imageOnly')
            ? ImageOnlyMessage.fromJson(
                _json['imageOnly'] as core.Map<core.String, core.dynamic>)
            : null,
        modal: _json.containsKey('modal')
            ? ModalMessage.fromJson(
                _json['modal'] as core.Map<core.String, core.dynamic>)
            : null,
      );