LighthouseAuditResultV5.fromJson constructor

LighthouseAuditResultV5.fromJson(
  1. Map json_
)

Implementation

LighthouseAuditResultV5.fromJson(core.Map json_)
    : this(
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        details: json_.containsKey('details')
            ? json_['details'] as core.Map<core.String, core.dynamic>
            : null,
        displayValue: json_.containsKey('displayValue')
            ? json_['displayValue'] as core.String
            : null,
        errorMessage: json_.containsKey('errorMessage')
            ? json_['errorMessage'] as core.String
            : null,
        explanation: json_.containsKey('explanation')
            ? json_['explanation'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        numericUnit: json_.containsKey('numericUnit')
            ? json_['numericUnit'] as core.String
            : null,
        numericValue: json_.containsKey('numericValue')
            ? (json_['numericValue'] as core.num).toDouble()
            : null,
        score: json_.containsKey('score') ? json_['score'] : null,
        scoreDisplayMode: json_.containsKey('scoreDisplayMode')
            ? json_['scoreDisplayMode'] as core.String
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        warnings: json_.containsKey('warnings') ? json_['warnings'] : null,
      );