RetainingNode.fromJson constructor

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

Implementation

RetainingNode.fromJson(Map<String, dynamic> json) {
  clazz = json['clazz'];
  parentKey = json['parentKey'];
  parentIndex = json['parentIndex'];
  string = json['string'];
  leakedNodeType =
      LeakedNodeType.values[(json['leakedNodeType'] ?? 0) as int];
  if (json['sourceCodeLocation'] is Map) {
    sourceCodeLocation =
        SourceCodeLocation.fromJson(json['sourceCodeLocation']);
  }
  parentField = json['parentField'];
  libraries = json['libraries'];
  important = json['important'];
  if (json['closureInfo'] is Map) {
    closureInfo = ClosureInfo.fromJson(json['closureInfo']);
  }
}