toJson method
Implementation
Map<String, dynamic> toJson() {
final eventType = this.eventType;
final timestamp = this.timestamp;
final appPackageName = this.appPackageName;
final appTitle = this.appTitle;
final appVersionCode = this.appVersionCode;
final attributes = this.attributes;
final clientSdkVersion = this.clientSdkVersion;
final metrics = this.metrics;
final sdkName = this.sdkName;
final session = this.session;
return {
'EventType': eventType,
'Timestamp': timestamp,
if (appPackageName != null) 'AppPackageName': appPackageName,
if (appTitle != null) 'AppTitle': appTitle,
if (appVersionCode != null) 'AppVersionCode': appVersionCode,
if (attributes != null) 'Attributes': attributes,
if (clientSdkVersion != null) 'ClientSdkVersion': clientSdkVersion,
if (metrics != null) 'Metrics': metrics,
if (sdkName != null) 'SdkName': sdkName,
if (session != null) 'Session': session,
};
}