copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
PageBlockRelatedArticle copyWith({
String? url,
String? title,
String? description,
Photo? Function()? photo,
String? author,
int? publishDate,
}) =>
PageBlockRelatedArticle(
url: url ?? this.url,
title: title ?? this.title,
description: description ?? this.description,
photo: photo != null ? photo() : this.photo,
author: author ?? this.author,
publishDate: publishDate ?? this.publishDate,
);