StackTraceData.fromJson constructor

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

Implementation

factory StackTraceData.fromJson(Map<String, dynamic> json) {
  return StackTraceData(
    description:
        json.containsKey('description')
            ? json['description'] as String
            : null,
    callFrames:
        (json['callFrames'] as List)
            .map((e) => CallFrame.fromJson(e as Map<String, dynamic>))
            .toList(),
    parent:
        json.containsKey('parent')
            ? StackTraceData.fromJson(json['parent'] as Map<String, dynamic>)
            : null,
    parentId:
        json.containsKey('parentId')
            ? StackTraceId.fromJson(json['parentId'] as Map<String, dynamic>)
            : null,
  );
}