toJson method
Implementation
Map<String, Object?> toJson() => {
'version': 2,
'project': project,
'sdk': {'name': SdkInfo.name, 'version': SdkInfo.version},
if (gitSha != null || gitBranch != null)
'git': {
if (gitSha != null) 'sha': gitSha,
if (gitBranch != null) 'branch': gitBranch,
},
'captures': [for (final c in captures) c.toJson()],
};