copyWith method

  1. @override
UpdateChatDraftMessage copyWith({
  1. int? chatId,
  2. DraftMessage? draftMessage()?,
  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
UpdateChatDraftMessage copyWith({
  int? chatId,
  DraftMessage? Function()? draftMessage,
  List<ChatPosition>? positions,
  dynamic extra,
  int? clientId,
}) =>
    UpdateChatDraftMessage(
      chatId: chatId ?? this.chatId,
      draftMessage: draftMessage != null ? draftMessage() : this.draftMessage,
      positions: positions ?? this.positions,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );