copyWith method
TrackEvent
copyWith({
- EventType? type,
- String? siteId,
- String? pathname,
- String? hostname,
- String? pageTitle,
- String? referrer,
- String? userId,
- String? eventName,
- Map<
String, dynamic> ? properties, - Map<
String, String> ? queryParams, - String? language,
- int? screenWidth,
- int? screenHeight,
- String? userAgent,
- String? ipAddress,
Creates a copy of this event with the specified parameters overridden.
Implementation
TrackEvent copyWith({
EventType? type,
String? siteId,
String? pathname,
String? hostname,
String? pageTitle,
String? referrer,
String? userId,
String? eventName,
Map<String, dynamic>? properties,
Map<String, String>? queryParams,
String? language,
int? screenWidth,
int? screenHeight,
String? userAgent,
String? ipAddress,
}) {
return TrackEvent(
type: type ?? this.type,
siteId: siteId ?? this.siteId,
pathname: pathname ?? this.pathname,
hostname: hostname ?? this.hostname,
pageTitle: pageTitle ?? this.pageTitle,
referrer: referrer ?? this.referrer,
userId: userId ?? this.userId,
eventName: eventName ?? this.eventName,
properties: properties ?? this.properties,
queryParams: queryParams ?? this.queryParams,
language: language ?? this.language,
screenWidth: screenWidth ?? this.screenWidth,
screenHeight: screenHeight ?? this.screenHeight,
userAgent: userAgent ?? this.userAgent,
ipAddress: ipAddress ?? this.ipAddress,
);
}