GetSnapshotResult.fromJson constructor

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

Implementation

factory GetSnapshotResult.fromJson(Map<String, dynamic> json) {
  return GetSnapshotResult(
    domNodes: (json['domNodes'] as List)
        .map((e) => DOMNode.fromJson(e as Map<String, dynamic>))
        .toList(),
    layoutTreeNodes: (json['layoutTreeNodes'] as List)
        .map((e) => LayoutTreeNode.fromJson(e as Map<String, dynamic>))
        .toList(),
    computedStyles: (json['computedStyles'] as List)
        .map((e) => ComputedStyle.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}