copyWith method

  1. @override
PageBlockEmbedded copyWith({
  1. String? url,
  2. String? html,
  3. Photo? posterPhoto()?,
  4. int? width,
  5. int? height,
  6. PageBlockCaption? caption()?,
  7. bool? isFullWidth,
  8. 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? Function()? 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 != null ? caption() : this.caption,
  isFullWidth: isFullWidth ?? this.isFullWidth,
  allowScrolling: allowScrolling ?? this.allowScrolling,
);