LayoutShiftAttribution.fromJson constructor

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

Implementation

factory LayoutShiftAttribution.fromJson(Map<String, dynamic> json) {
  return LayoutShiftAttribution(
    previousRect:
        dom.Rect.fromJson(json['previousRect'] as Map<String, dynamic>),
    currentRect:
        dom.Rect.fromJson(json['currentRect'] as Map<String, dynamic>),
    nodeId: json.containsKey('nodeId')
        ? dom.BackendNodeId.fromJson(json['nodeId'] as int)
        : null,
  );
}