copyWith method

SearchSecretMessages copyWith({
  1. int? chatId,
  2. String? query,
  3. String? offset,
  4. int? limit,
  5. SearchMessagesFilter? filter()?,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

SearchSecretMessages copyWith({
  int? chatId,
  String? query,
  String? offset,
  int? limit,
  SearchMessagesFilter? Function()? filter,
}) =>
    SearchSecretMessages(
      chatId: chatId ?? this.chatId,
      query: query ?? this.query,
      offset: offset ?? this.offset,
      limit: limit ?? this.limit,
      filter: filter != null ? filter() : this.filter,
    );