copyWith method
PageBlockEmbedded
copyWith({
- String? url,
- String? html,
- Photo? posterPhoto()?,
- int? width,
- int? height,
- PageBlockCaption? caption,
- bool? isFullWidth,
- bool? allowScrolling,
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
PageBlockEmbedded copyWith({
String? url,
String? html,
Photo? Function()? posterPhoto,
int? width,
int? height,
PageBlockCaption? caption,
bool? isFullWidth,
bool? allowScrolling,
}) =>
PageBlockEmbedded(
url: url ?? this.url,
html: html ?? this.html,
posterPhoto: posterPhoto != null ? posterPhoto() : this.posterPhoto,
width: width ?? this.width,
height: height ?? this.height,
caption: caption ?? this.caption,
isFullWidth: isFullWidth ?? this.isFullWidth,
allowScrolling: allowScrolling ?? this.allowScrolling,
);