PagespeedApiLoadingExperienceV5.fromJson constructor Null safety

PagespeedApiLoadingExperienceV5.fromJson(
  1. Map _json
)

Implementation

PagespeedApiLoadingExperienceV5.fromJson(core.Map _json)
    : this(
        id: _json.containsKey('id') ? _json['id'] as core.String : null,
        initialUrl: _json.containsKey('initial_url')
            ? _json['initial_url'] as core.String
            : null,
        metrics: _json.containsKey('metrics')
            ? (_json['metrics'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  UserPageLoadMetricV5.fromJson(
                      item as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        originFallback: _json.containsKey('origin_fallback')
            ? _json['origin_fallback'] as core.bool
            : null,
        overallCategory: _json.containsKey('overall_category')
            ? _json['overall_category'] as core.String
            : null,
      );