toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'severity': severity.name,
  'code': code,
  'message': message,
  if (key != null) 'key': key,
  if (firstType != null) 'firstType': chartTypeToString(firstType!),
  if (secondType != null) 'secondType': chartTypeToString(secondType!),
};