copyWith method

  1. @override
InlineQueryResultContact copyWith({
  1. String? id,
  2. Contact? contact,
  3. 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
InlineQueryResultContact copyWith({
  String? id,
  Contact? contact,
  Thumbnail? Function()? thumbnail,
}) =>
    InlineQueryResultContact(
      id: id ?? this.id,
      contact: contact ?? this.contact,
      thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
    );