Product.fromJson constructor

Product.fromJson(
  1. Map json_
)

Implementation

Product.fromJson(core.Map json_)
    : this(
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        productCategory: json_.containsKey('productCategory')
            ? json_['productCategory'] as core.String
            : null,
        productLabels: json_.containsKey('productLabels')
            ? (json_['productLabels'] as core.List)
                .map((value) => KeyValue.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );