copyWith method

LinkPreviewOptions copyWith({
  1. bool? isDisabled,
  2. String? url,
  3. bool? forceSmallMedia,
  4. bool? forceLargeMedia,
  5. bool? showAboveText,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

LinkPreviewOptions copyWith({
  bool? isDisabled,
  String? url,
  bool? forceSmallMedia,
  bool? forceLargeMedia,
  bool? showAboveText,
}) =>
    LinkPreviewOptions(
      isDisabled: isDisabled ?? this.isDisabled,
      url: url ?? this.url,
      forceSmallMedia: forceSmallMedia ?? this.forceSmallMedia,
      forceLargeMedia: forceLargeMedia ?? this.forceLargeMedia,
      showAboveText: showAboveText ?? this.showAboveText,
    );