copyWith method
Message
copyWith({
- String? id,
- GlobalKey<
State< ? key,StatefulWidget> > - String? message,
- DateTime? createdAt,
- String? sentBy,
- ReplyMessage? replyMessage,
- Reaction? reaction,
- MessageType? messageType,
- Duration? voiceMessageDuration,
- MessageStatus? status,
- bool forceNullValue = false,
Implementation
Message copyWith({
String? id,
GlobalKey? key,
String? message,
DateTime? createdAt,
String? sentBy,
ReplyMessage? replyMessage,
Reaction? reaction,
MessageType? messageType,
Duration? voiceMessageDuration,
MessageStatus? status,
bool forceNullValue = false,
}) {
return Message(
id: id ?? this.id,
message: message ?? this.message,
createdAt: createdAt ?? this.createdAt,
sentBy: sentBy ?? this.sentBy,
messageType: messageType ?? this.messageType,
voiceMessageDuration: forceNullValue
? voiceMessageDuration
: voiceMessageDuration ?? this.voiceMessageDuration,
reaction: reaction ?? this.reaction,
replyMessage: replyMessage ?? this.replyMessage,
status: status ?? this.status,
);
}