copyWith method

  1. @override
UpdateChatReadInbox copyWith({
  1. int? chatId,
  2. int? lastReadInboxMessageId,
  3. int? unreadCount,
  4. dynamic extra,
  5. int? clientId,
})
override

Copy model with modified properties.

Properties:

  • chat_id: Chat identifier
  • last_read_inbox_message_id: Identifier of the last read incoming message
  • unread_count: The number of unread messages left in the chat

Implementation

@override
UpdateChatReadInbox copyWith({
  int? chatId,
  int? lastReadInboxMessageId,
  int? unreadCount,
  dynamic extra,
  int? clientId,
}) =>
    UpdateChatReadInbox(
      chatId: chatId ?? this.chatId,
      lastReadInboxMessageId:
          lastReadInboxMessageId ?? this.lastReadInboxMessageId,
      unreadCount: unreadCount ?? this.unreadCount,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );