copyWith method

SearchChatMembers copyWith({
  1. int? chatId,
  2. String? query,
  3. int? limit,
  4. ChatMembersFilter? filter()?,
})

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

Implementation

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