Mechanism.fromJson constructor

Mechanism.fromJson(
  1. Map<String, dynamic> jsonData
)

Deserializes a Mechanism from JSON Map.

Implementation

factory Mechanism.fromJson(Map<String, dynamic> jsonData) {
  final json = AccessAwareMap(jsonData);
  var data = json['data'];
  if (data != null) {
    data = Map<String, dynamic>.from(data as Map);
  }

  var meta = json['meta'];
  if (meta != null) {
    meta = Map<String, dynamic>.from(meta as Map);
  }

  return Mechanism(
    type: json['type'],
    description: json['description'],
    helpLink: json['help_link'],
    handled: json['handled'],
    meta: meta,
    data: data,
    synthetic: json['synthetic'],
    isExceptionGroup: json['is_exception_group'],
    source: json['source'],
    exceptionId: json['exception_id'],
    parentId: json['parent_id'],
    unknown: json.notAccessed(),
  );
}