copyWith method

MessageLinkInfo copyWith({
  1. bool? isPublic,
  2. int? chatId,
  3. MessageTopic? topicId()?,
  4. Message? message()?,
  5. int? mediaTimestamp,
  6. int? checklistTaskId,
  7. String? pollOptionId,
  8. bool? forAlbum,
  9. dynamic extra,
  10. 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

MessageLinkInfo copyWith({
  bool? isPublic,
  int? chatId,
  MessageTopic? Function()? topicId,
  Message? Function()? message,
  int? mediaTimestamp,
  int? checklistTaskId,
  String? pollOptionId,
  bool? forAlbum,
  dynamic extra,
  int? clientId,
}) => MessageLinkInfo(
  isPublic: isPublic ?? this.isPublic,
  chatId: chatId ?? this.chatId,
  topicId: topicId != null ? topicId() : this.topicId,
  message: message != null ? message() : this.message,
  mediaTimestamp: mediaTimestamp ?? this.mediaTimestamp,
  checklistTaskId: checklistTaskId ?? this.checklistTaskId,
  pollOptionId: pollOptionId ?? this.pollOptionId,
  forAlbum: forAlbum ?? this.forAlbum,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);