copyWith method

MessageLinkInfo copyWith({
  1. bool? isPublic,
  2. int? chatId,
  3. int? messageThreadId,
  4. Message? message()?,
  5. int? mediaTimestamp,
  6. bool? forAlbum,
  7. dynamic extra,
  8. 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,
  int? messageThreadId,
  Message? Function()? message,
  int? mediaTimestamp,
  bool? forAlbum,
  dynamic extra,
  int? clientId,
}) =>
    MessageLinkInfo(
      isPublic: isPublic ?? this.isPublic,
      chatId: chatId ?? this.chatId,
      messageThreadId: messageThreadId ?? this.messageThreadId,
      message: message != null ? message() : this.message,
      mediaTimestamp: mediaTimestamp ?? this.mediaTimestamp,
      forAlbum: forAlbum ?? this.forAlbum,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );