copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
SearchMessages copyWith({
ChatList? Function()? chatList,
String? query,
String? offset,
int? limit,
SearchMessagesFilter? Function()? filter,
int? minDate,
int? maxDate,
}) =>
SearchMessages(
chatList: chatList != null ? chatList() : this.chatList,
query: query ?? this.query,
offset: offset ?? this.offset,
limit: limit ?? this.limit,
filter: filter != null ? filter() : this.filter,
minDate: minDate ?? this.minDate,
maxDate: maxDate ?? this.maxDate,
);