copyWith method
UpdateChatLastMessage
copyWith({
- int? chatId,
- Message? lastMessage()?,
- List<
ChatPosition> ? positions, - dynamic extra,
- int? clientId,
override
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
@override
UpdateChatLastMessage copyWith({
int? chatId,
Message? Function()? lastMessage,
List<ChatPosition>? positions,
dynamic extra,
int? clientId,
}) =>
UpdateChatLastMessage(
chatId: chatId ?? this.chatId,
lastMessage: lastMessage != null ? lastMessage() : this.lastMessage,
positions: positions ?? this.positions,
extra: extra ?? this.extra,
clientId: clientId ?? this.clientId,
);