ProfileNode.fromJson constructor

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

Implementation

factory ProfileNode.fromJson(Map<String, dynamic> json) {
  return ProfileNode(
    id: json['id'] as int,
    callFrame:
        runtime.CallFrame.fromJson(json['callFrame'] as Map<String, dynamic>),
    hitCount: json.containsKey('hitCount') ? json['hitCount'] as int : null,
    children: json.containsKey('children')
        ? (json['children'] as List).map((e) => e as int).toList()
        : null,
    deoptReason: json.containsKey('deoptReason')
        ? json['deoptReason'] as String
        : null,
    positionTicks: json.containsKey('positionTicks')
        ? (json['positionTicks'] as List)
            .map((e) => PositionTickInfo.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
  );
}