copyWith method

ReplyMessage copyWith({
  1. String? messageId,
  2. String? message,
  3. String? replyTo,
  4. String? replyBy,
  5. MessageType? messageType,
  6. Duration? voiceMessageDuration,
  7. bool forceNullValue = false,
})

Implementation

ReplyMessage copyWith({
  String? messageId,
  String? message,
  String? replyTo,
  String? replyBy,
  MessageType? messageType,
  Duration? voiceMessageDuration,
  bool forceNullValue = false,
}) {
  return ReplyMessage(
    messageId: messageId ?? this.messageId,
    message: message ?? this.message,
    replyTo: replyTo ?? this.replyTo,
    replyBy: replyBy ?? this.replyBy,
    messageType: messageType ?? this.messageType,
    voiceMessageDuration: forceNullValue
        ? voiceMessageDuration
        : voiceMessageDuration ?? this.voiceMessageDuration,
  );
}