LargestContentfulPaint.fromJson constructor

LargestContentfulPaint.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory LargestContentfulPaint.fromJson(Map<String, dynamic> json) {
  return LargestContentfulPaint(
    renderTime: network.TimeSinceEpoch.fromJson(json['renderTime'] as num),
    loadTime: network.TimeSinceEpoch.fromJson(json['loadTime'] as num),
    size: json['size'] as num,
    elementId:
        json.containsKey('elementId') ? json['elementId'] as String : null,
    url: json.containsKey('url') ? json['url'] as String : null,
    nodeId: json.containsKey('nodeId')
        ? dom.BackendNodeId.fromJson(json['nodeId'] as int)
        : null,
  );
}