copyWith method
Creates a copy of this search item with updated fields.
Implementation
SearchItem copyWith({
String? id,
String? title,
String? subtitle,
String? groupId,
String? description,
String? imageUrl,
Map<String, dynamic>? metadata,
String? route,
void Function()? onTap,
}) {
return SearchItem(
id: id ?? this.id,
title: title ?? this.title,
subtitle: subtitle ?? this.subtitle,
groupId: groupId ?? this.groupId,
description: description ?? this.description,
imageUrl: imageUrl ?? this.imageUrl,
metadata: metadata ?? this.metadata,
route: route ?? this.route,
onTap: onTap ?? this.onTap,
);
}