copyWith method

  1. @override
LinkPreviewTypeChat copyWith({
  1. InviteLinkChatType? type,
  2. ChatPhoto? photo()?,
  3. bool? createsJoinRequest,
})
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
LinkPreviewTypeChat copyWith({
  InviteLinkChatType? type,
  ChatPhoto? Function()? photo,
  bool? createsJoinRequest,
}) => LinkPreviewTypeChat(
  type: type ?? this.type,
  photo: photo != null ? photo() : this.photo,
  createsJoinRequest: createsJoinRequest ?? this.createsJoinRequest,
);