Initiator.fromJson constructor

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

Implementation

factory Initiator.fromJson(Map<String, dynamic> json) {
  return Initiator(
    type: InitiatorType.fromJson(json['type'] as String),
    stack: json.containsKey('stack')
        ? runtime.StackTraceData.fromJson(
            json['stack'] as Map<String, dynamic>)
        : null,
    url: json.containsKey('url') ? json['url'] as String : null,
    lineNumber:
        json.containsKey('lineNumber') ? json['lineNumber'] as num : null,
    columnNumber:
        json.containsKey('columnNumber') ? json['columnNumber'] as num : null,
    requestId: json.containsKey('requestId')
        ? RequestId.fromJson(json['requestId'] as String)
        : null,
  );
}