core.Map<core.String, core.dynamic> toJson() => { if (stackTrace != null) 'stackTrace': stackTrace!.toJson(), };