copyWith method

ForwardSource copyWith({
  1. int? chatId,
  2. int? messageId,
  3. MessageSender? senderId()?,
  4. String? senderName,
  5. int? date,
  6. bool? isOutgoing,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

ForwardSource copyWith({
  int? chatId,
  int? messageId,
  MessageSender? Function()? senderId,
  String? senderName,
  int? date,
  bool? isOutgoing,
}) =>
    ForwardSource(
      chatId: chatId ?? this.chatId,
      messageId: messageId ?? this.messageId,
      senderId: senderId != null ? senderId() : this.senderId,
      senderName: senderName ?? this.senderName,
      date: date ?? this.date,
      isOutgoing: isOutgoing ?? this.isOutgoing,
    );