Collection.fromJson constructor

Collection.fromJson(
  1. Map json_
)

Implementation

Collection.fromJson(core.Map json_)
    : this(
        customLabel0: json_.containsKey('customLabel0')
            ? json_['customLabel0'] as core.String
            : null,
        customLabel1: json_.containsKey('customLabel1')
            ? json_['customLabel1'] as core.String
            : null,
        customLabel2: json_.containsKey('customLabel2')
            ? json_['customLabel2'] as core.String
            : null,
        customLabel3: json_.containsKey('customLabel3')
            ? json_['customLabel3'] as core.String
            : null,
        customLabel4: json_.containsKey('customLabel4')
            ? json_['customLabel4'] as core.String
            : null,
        featuredProduct: json_.containsKey('featuredProduct')
            ? (json_['featuredProduct'] as core.List)
                .map((value) => CollectionFeaturedProduct.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        headline: json_.containsKey('headline')
            ? (json_['headline'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        imageLink: json_.containsKey('imageLink')
            ? (json_['imageLink'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        language: json_.containsKey('language')
            ? json_['language'] as core.String
            : null,
        link: json_.containsKey('link') ? json_['link'] as core.String : null,
        mobileLink: json_.containsKey('mobileLink')
            ? json_['mobileLink'] as core.String
            : null,
        productCountry: json_.containsKey('productCountry')
            ? json_['productCountry'] as core.String
            : null,
      );