Promotion.fromJson constructor

Promotion.fromJson(
  1. Map json_
)

Implementation

Promotion.fromJson(core.Map json_)
    : this(
        bodyLines: json_.containsKey('bodyLines')
            ? (json_['bodyLines'] as core.List)
                .map((value) => PromotionBodyLines.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        displayLink: json_.containsKey('displayLink')
            ? json_['displayLink'] as core.String
            : null,
        htmlTitle: json_.containsKey('htmlTitle')
            ? json_['htmlTitle'] as core.String
            : null,
        image: json_.containsKey('image')
            ? PromotionImage.fromJson(
                json_['image'] as core.Map<core.String, core.dynamic>)
            : null,
        link: json_.containsKey('link') ? json_['link'] as core.String : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
      );