copyWith method
Creates a copy of this CustomAdModel with updated fields.
Implementation
CustomAdModel copyWith({
String? id,
String? title,
String? description,
String? imageUrl,
String? link,
String? callToAction,
String? advertiser,
double? rating,
VoidCallback? onTap,
Map<String, dynamic>? extras,
}) {
return CustomAdModel(
id: id ?? this.id,
title: title ?? this.title,
description: description ?? this.description,
imageUrl: imageUrl ?? this.imageUrl,
link: link ?? this.link,
callToAction: callToAction ?? this.callToAction,
advertiser: advertiser ?? this.advertiser,
rating: rating ?? this.rating,
onTap: onTap ?? this.onTap,
extras: extras ?? this.extras,
);
}