toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'source': source,
    'level': level,
    'text': text,
    'timestamp': timestamp.toJson(),
    if (category != null) 'category': category,
    if (url != null) 'url': url,
    if (lineNumber != null) 'lineNumber': lineNumber,
    if (stackTrace != null) 'stackTrace': stackTrace!.toJson(),
    if (networkRequestId != null)
      'networkRequestId': networkRequestId!.toJson(),
    if (workerId != null) 'workerId': workerId,
    if (args != null) 'args': args!.map((e) => e.toJson()).toList(),
  };
}