toJson method
Produces a Map that can be serialized to JSON.
Implementation
Map<String, dynamic> toJson() {
return {
...?unknown,
'trace_id': traceId.toString(),
'public_key': publicKey,
if (release != null) 'release': release,
if (environment != null) 'environment': environment,
if (userId != null) 'user_id': userId,
// ignore: deprecated_member_use_from_same_package
if (userSegment != null) 'user_segment': userSegment,
if (transaction != null) 'transaction': transaction,
if (sampleRate != null) 'sample_rate': sampleRate,
if (sampled != null) 'sampled': sampled,
if (replayId != null) 'replay_id': replayId.toString(),
};
}