copyWith method
Create a copy with updated fields
Implementation
AdItem copyWith({
String? adId,
String? campaignId,
String? id,
String? imageUrl,
String? clickUrl,
String? ttl,
bool? isViewed,
String? type,
int? priority,
int? impressionCount,
Map<String, dynamic>? action,
}) {
return AdItem(
adId: adId ?? this.adId,
campaignId: campaignId ?? this.campaignId,
id: id ?? this.id,
imageUrl: imageUrl ?? this.imageUrl,
clickUrl: clickUrl ?? this.clickUrl,
ttl: ttl ?? this.ttl,
isViewed: isViewed ?? this.isViewed,
type: type ?? this.type,
priority: priority ?? this.priority,
impressionCount: impressionCount ?? this.impressionCount,
action: action ?? this.action,
);
}