SentryStackTrace.fromJson constructor

SentryStackTrace.fromJson(
  1. Map<String, dynamic> data
)

Deserializes a SentryStackTrace from JSON Map.

Implementation

factory SentryStackTrace.fromJson(Map<String, dynamic> data) {
  final json = AccessAwareMap(data);
  final framesJson = json['frames'] as List<dynamic>?;
  return SentryStackTrace(
    frames: framesJson != null
        ? framesJson
            .map((frameJson) => SentryStackFrame.fromJson(frameJson))
            .toList()
        : [],
    registers: json['registers'],
    lang: json['lang'],
    snapshot: json['snapshot'],
    unknown: json.notAccessed(),
  );
}