ScriptParsedEvent.fromJson constructor

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

Implementation

factory ScriptParsedEvent.fromJson(Map<String, dynamic> json) {
  return ScriptParsedEvent(
    scriptId: runtime.ScriptId.fromJson(json['scriptId'] as String),
    url: json['url'] as String,
    startLine: json['startLine'] as int,
    startColumn: json['startColumn'] as int,
    endLine: json['endLine'] as int,
    endColumn: json['endColumn'] as int,
    executionContextId: runtime.ExecutionContextId.fromJson(
        json['executionContextId'] as int),
    hash: json['hash'] as String,
    executionContextAuxData: json.containsKey('executionContextAuxData')
        ? json['executionContextAuxData'] as Map<String, dynamic>
        : null,
    isLiveEdit:
        json.containsKey('isLiveEdit') ? json['isLiveEdit'] as bool : null,
    sourceMapURL: json.containsKey('sourceMapURL')
        ? json['sourceMapURL'] as String
        : null,
    hasSourceURL: json.containsKey('hasSourceURL')
        ? json['hasSourceURL'] as bool
        : null,
    isModule: json.containsKey('isModule') ? json['isModule'] as bool : null,
    length: json.containsKey('length') ? json['length'] as int : null,
    stackTrace: json.containsKey('stackTrace')
        ? runtime.StackTraceData.fromJson(
            json['stackTrace'] as Map<String, dynamic>)
        : null,
    codeOffset:
        json.containsKey('codeOffset') ? json['codeOffset'] as int : null,
    scriptLanguage: json.containsKey('scriptLanguage')
        ? debugger.ScriptLanguage.fromJson(json['scriptLanguage'] as String)
        : null,
    debugSymbols: json.containsKey('debugSymbols')
        ? debugger.DebugSymbols.fromJson(
            json['debugSymbols'] as Map<String, dynamic>)
        : null,
    embedderName: json.containsKey('embedderName')
        ? json['embedderName'] as String
        : null,
  );
}