copyWith method
PageBlockEmbeddedPost
copyWith({
- String? url,
- String? author,
- Photo? authorPhoto()?,
- int? date,
- List<
PageBlock> ? pageBlocks, - PageBlockCaption? caption,
override
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
@override
PageBlockEmbeddedPost copyWith({
String? url,
String? author,
Photo? Function()? authorPhoto,
int? date,
List<PageBlock>? pageBlocks,
PageBlockCaption? caption,
}) =>
PageBlockEmbeddedPost(
url: url ?? this.url,
author: author ?? this.author,
authorPhoto: authorPhoto != null ? authorPhoto() : this.authorPhoto,
date: date ?? this.date,
pageBlocks: pageBlocks ?? this.pageBlocks,
caption: caption ?? this.caption,
);