toMap method
Implementation
@override
Map<String, dynamic> toMap() {
if (eventName.isEmpty) {
throw ArgumentError('TrackEventPayload.eventName must not be empty');
}
final map = <String, dynamic>{'eventName': eventName};
if (data != null) map['data'] = data;
if (profileId != null) map['profileId'] = profileId;
if (provider != null) map['provider'] = provider;
if (eventType != null) map['eventType'] = eventType;
return map;
}