copyWith method
WebPage
copyWith({
- String? url,
- String? displayUrl,
- String? type,
- String? siteName,
- String? title,
- FormattedText? description,
- Photo? photo()?,
- String? embedUrl,
- String? embedType,
- int? embedWidth,
- int? embedHeight,
- int? duration,
- String? author,
- bool? hasLargeMedia,
- bool? showLargeMedia,
- bool? skipConfirmation,
- bool? showAboveText,
- Animation? animation()?,
- Audio? audio()?,
- Document? document()?,
- Sticker? sticker()?,
- Video? video()?,
- VideoNote? videoNote()?,
- VoiceNote? voiceNote()?,
- int? storySenderChatId,
- int? storyId,
- int? instantViewVersion,
- dynamic extra,
- int? clientId,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
WebPage copyWith({
String? url,
String? displayUrl,
String? type,
String? siteName,
String? title,
FormattedText? description,
Photo? Function()? photo,
String? embedUrl,
String? embedType,
int? embedWidth,
int? embedHeight,
int? duration,
String? author,
bool? hasLargeMedia,
bool? showLargeMedia,
bool? skipConfirmation,
bool? showAboveText,
Animation? Function()? animation,
Audio? Function()? audio,
Document? Function()? document,
Sticker? Function()? sticker,
Video? Function()? video,
VideoNote? Function()? videoNote,
VoiceNote? Function()? voiceNote,
int? storySenderChatId,
int? storyId,
int? instantViewVersion,
dynamic extra,
int? clientId,
}) =>
WebPage(
url: url ?? this.url,
displayUrl: displayUrl ?? this.displayUrl,
type: type ?? this.type,
siteName: siteName ?? this.siteName,
title: title ?? this.title,
description: description ?? this.description,
photo: photo != null ? photo() : this.photo,
embedUrl: embedUrl ?? this.embedUrl,
embedType: embedType ?? this.embedType,
embedWidth: embedWidth ?? this.embedWidth,
embedHeight: embedHeight ?? this.embedHeight,
duration: duration ?? this.duration,
author: author ?? this.author,
hasLargeMedia: hasLargeMedia ?? this.hasLargeMedia,
showLargeMedia: showLargeMedia ?? this.showLargeMedia,
skipConfirmation: skipConfirmation ?? this.skipConfirmation,
showAboveText: showAboveText ?? this.showAboveText,
animation: animation != null ? animation() : this.animation,
audio: audio != null ? audio() : this.audio,
document: document != null ? document() : this.document,
sticker: sticker != null ? sticker() : this.sticker,
video: video != null ? video() : this.video,
videoNote: videoNote != null ? videoNote() : this.videoNote,
voiceNote: voiceNote != null ? voiceNote() : this.voiceNote,
storySenderChatId: storySenderChatId ?? this.storySenderChatId,
storyId: storyId ?? this.storyId,
instantViewVersion: instantViewVersion ?? this.instantViewVersion,
extra: extra ?? this.extra,
clientId: clientId ?? this.clientId,
);