copyWith method

  1. @override
UpdateChatAction copyWith({
  1. int? chatId,
  2. MessageTopic? topicId()?,
  3. MessageSender? senderId,
  4. ChatAction? action,
  5. dynamic extra,
  6. 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
UpdateChatAction copyWith({
  int? chatId,
  MessageTopic? Function()? topicId,
  MessageSender? senderId,
  ChatAction? action,
  dynamic extra,
  int? clientId,
}) => UpdateChatAction(
  chatId: chatId ?? this.chatId,
  topicId: topicId != null ? topicId() : this.topicId,
  senderId: senderId ?? this.senderId,
  action: action ?? this.action,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);