Message.fromJson constructor

  1. @override
Message.fromJson(
  1. Json json
)

Implementation

@override
factory Message.fromJson(Json json) {
  final stackTrace = StackTraceParser.fromJsonList(
     (json['stackTrace'] as List?)?.cast<Map<String, dynamic>>()
  );
  final msg = Message(
    json['message'],
    Severity.values.byName(json['severity']),
    json['tag'],
    stackTrace,
    json['error'],
    json['function'],
    json['fileName'],
    json['lineNumber'],
    json
  );
  msg.callerRawFrame = json['callerRawFrame'];
  msg.callStackSymbols = (json['callStackSymbols'] as List?)?.cast<String>();
  if (json['exception'] is Map<String, dynamic>) {
    msg.exception = MessageException.fromJson(json['exception']);
  }
  return msg;
}