Breadcrumb.fromJson constructor
Deserializes a Breadcrumb from JSON Map.
Implementation
factory Breadcrumb.fromJson(Map<String, dynamic> jsonData) {
final json = AccessAwareMap(jsonData);
final levelName = json['level'];
final timestamp = json['timestamp'];
var data = json['data'];
if (data != null) {
data = Map<String, dynamic>.from(data as Map);
}
return Breadcrumb(
timestamp: timestamp != null ? DateTime.tryParse(timestamp) : null,
message: json['message'],
category: json['category'],
data: data,
level: levelName != null ? SentryLevel.fromName(levelName) : null,
type: json['type'],
unknown: json.notAccessed(),
);
}