Search.fromJson constructor

Search.fromJson(
  1. Map json_
)

Implementation

Search.fromJson(core.Map json_)
    : this(
        context: json_.containsKey('context')
            ? json_['context'] as core.Map<core.String, core.dynamic>
            : null,
        items: json_.containsKey('items')
            ? (json_['items'] as core.List)
                .map((value) => Result.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        promotions: json_.containsKey('promotions')
            ? (json_['promotions'] as core.List)
                .map((value) => Promotion.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        queries: json_.containsKey('queries')
            ? SearchQueries.fromJson(
                json_['queries'] as core.Map<core.String, core.dynamic>)
            : null,
        searchInformation: json_.containsKey('searchInformation')
            ? SearchSearchInformation.fromJson(json_['searchInformation']
                as core.Map<core.String, core.dynamic>)
            : null,
        spelling: json_.containsKey('spelling')
            ? SearchSpelling.fromJson(
                json_['spelling'] as core.Map<core.String, core.dynamic>)
            : null,
        url: json_.containsKey('url')
            ? SearchUrl.fromJson(
                json_['url'] as core.Map<core.String, core.dynamic>)
            : null,
      );