copyWith method
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,
);