copyWith method
LinkPreview
copyWith({
- String? url,
- String? displayUrl,
- String? siteName,
- String? title,
- FormattedText? description,
- String? author,
- LinkPreviewType? type,
- bool? hasLargeMedia,
- bool? showLargeMedia,
- bool? showMediaAboveDescription,
- bool? skipConfirmation,
- bool? showAboveText,
- 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
LinkPreview copyWith({
String? url,
String? displayUrl,
String? siteName,
String? title,
FormattedText? description,
String? author,
LinkPreviewType? type,
bool? hasLargeMedia,
bool? showLargeMedia,
bool? showMediaAboveDescription,
bool? skipConfirmation,
bool? showAboveText,
int? instantViewVersion,
dynamic extra,
int? clientId,
}) => LinkPreview(
url: url ?? this.url,
displayUrl: displayUrl ?? this.displayUrl,
siteName: siteName ?? this.siteName,
title: title ?? this.title,
description: description ?? this.description,
author: author ?? this.author,
type: type ?? this.type,
hasLargeMedia: hasLargeMedia ?? this.hasLargeMedia,
showLargeMedia: showLargeMedia ?? this.showLargeMedia,
showMediaAboveDescription:
showMediaAboveDescription ?? this.showMediaAboveDescription,
skipConfirmation: skipConfirmation ?? this.skipConfirmation,
showAboveText: showAboveText ?? this.showAboveText,
instantViewVersion: instantViewVersion ?? this.instantViewVersion,
extra: extra ?? this.extra,
clientId: clientId ?? this.clientId,
);