ErrorContext.fromJson constructor

ErrorContext.fromJson(
  1. Map _json
)

Implementation

ErrorContext.fromJson(core.Map _json)
    : this(
        httpRequest: _json.containsKey('httpRequest')
            ? HttpRequestContext.fromJson(
                _json['httpRequest'] as core.Map<core.String, core.dynamic>)
            : null,
        reportLocation: _json.containsKey('reportLocation')
            ? SourceLocation.fromJson(_json['reportLocation']
                as core.Map<core.String, core.dynamic>)
            : null,
        sourceReferences: _json.containsKey('sourceReferences')
            ? (_json['sourceReferences'] as core.List)
                .map((value) => SourceReference.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        user: _json.containsKey('user') ? _json['user'] as core.String : null,
      );