copyWith method

SearchSavedMessages copyWith({
  1. int? savedMessagesTopicId,
  2. ReactionType? tag()?,
  3. String? query,
  4. int? fromMessageId,
  5. int? offset,
  6. int? limit,
})

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

Implementation

SearchSavedMessages copyWith({
  int? savedMessagesTopicId,
  ReactionType? Function()? tag,
  String? query,
  int? fromMessageId,
  int? offset,
  int? limit,
}) =>
    SearchSavedMessages(
      savedMessagesTopicId: savedMessagesTopicId ?? this.savedMessagesTopicId,
      tag: tag != null ? tag() : this.tag,
      query: query ?? this.query,
      fromMessageId: fromMessageId ?? this.fromMessageId,
      offset: offset ?? this.offset,
      limit: limit ?? this.limit,
    );