copyWith method

  1. @override
UpdateChatLastMessage copyWith({
  1. int? chatId,
  2. Message? lastMessage()?,
  3. List<ChatPosition>? positions,
  4. dynamic extra,
  5. 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,
);