copyWith method

SearchResult copyWith({
  1. Content? content,
  2. User? user,
  3. Space? space,
  4. String? title,
  5. String? excerpt,
  6. String? url,
  7. ContainerSummary? resultParentContainer,
  8. ContainerSummary? resultGlobalContainer,
  9. List<Breadcrumb>? breadcrumbs,
  10. String? entityType,
  11. String? iconCssClass,
  12. DateTime? lastModified,
  13. String? friendlyLastModified,
  14. num? score,
})

Implementation

SearchResult copyWith(
    {Content? content,
    User? user,
    Space? space,
    String? title,
    String? excerpt,
    String? url,
    ContainerSummary? resultParentContainer,
    ContainerSummary? resultGlobalContainer,
    List<Breadcrumb>? breadcrumbs,
    String? entityType,
    String? iconCssClass,
    DateTime? lastModified,
    String? friendlyLastModified,
    num? score}) {
  return SearchResult(
    content: content ?? this.content,
    user: user ?? this.user,
    space: space ?? this.space,
    title: title ?? this.title,
    excerpt: excerpt ?? this.excerpt,
    url: url ?? this.url,
    resultParentContainer:
        resultParentContainer ?? this.resultParentContainer,
    resultGlobalContainer:
        resultGlobalContainer ?? this.resultGlobalContainer,
    breadcrumbs: breadcrumbs ?? this.breadcrumbs,
    entityType: entityType ?? this.entityType,
    iconCssClass: iconCssClass ?? this.iconCssClass,
    lastModified: lastModified ?? this.lastModified,
    friendlyLastModified: friendlyLastModified ?? this.friendlyLastModified,
    score: score ?? this.score,
  );
}