SuggestionProto.fromJson constructor

SuggestionProto.fromJson(
  1. Map _json
)

Implementation

SuggestionProto.fromJson(core.Map _json)
    : this(
        helpUrl: _json.containsKey('helpUrl')
            ? _json['helpUrl'] as core.String
            : null,
        longMessage: _json.containsKey('longMessage')
            ? SafeHtmlProto.fromJson(
                _json['longMessage'] as core.Map<core.String, core.dynamic>)
            : null,
        priority: _json.containsKey('priority')
            ? _json['priority'] as core.String
            : null,
        pseudoResourceId: _json.containsKey('pseudoResourceId')
            ? _json['pseudoResourceId'] as core.String
            : null,
        region: _json.containsKey('region')
            ? RegionProto.fromJson(
                _json['region'] as core.Map<core.String, core.dynamic>)
            : null,
        resourceName: _json.containsKey('resourceName')
            ? _json['resourceName'] as core.String
            : null,
        screenId: _json.containsKey('screenId')
            ? _json['screenId'] as core.String
            : null,
        secondaryPriority: _json.containsKey('secondaryPriority')
            ? (_json['secondaryPriority'] as core.num).toDouble()
            : null,
        shortMessage: _json.containsKey('shortMessage')
            ? SafeHtmlProto.fromJson(
                _json['shortMessage'] as core.Map<core.String, core.dynamic>)
            : null,
        title:
            _json.containsKey('title') ? _json['title'] as core.String : null,
      );