copyWith method

  1. @override
InlineQueryResultArticle copyWith({
  1. String? id,
  2. String? url,
  3. bool? hideUrl,
  4. String? title,
  5. String? description,
  6. Thumbnail? thumbnail()?,
})
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
InlineQueryResultArticle copyWith({
  String? id,
  String? url,
  bool? hideUrl,
  String? title,
  String? description,
  Thumbnail? Function()? thumbnail,
}) =>
    InlineQueryResultArticle(
      id: id ?? this.id,
      url: url ?? this.url,
      hideUrl: hideUrl ?? this.hideUrl,
      title: title ?? this.title,
      description: description ?? this.description,
      thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
    );