copyWith method

MessageModel copyWith({
  1. Message? message,
  2. List<MessageReaction>? reactions,
  3. Message? quoteMessage,
  4. ChatThread? thread,
  5. MessagePinInfo? pinInfo,
})

Implementation

MessageModel copyWith({
  Message? message,
  List<MessageReaction>? reactions,
  Message? quoteMessage,
  ChatThread? thread,
  MessagePinInfo? pinInfo,
}) {
  return MessageModel(
    modelId: id,
    message: message ?? this.message,
    reactions: reactions ?? this.reactions,
    quoteMessage: quoteMessage ?? this.quoteMessage,
    thread: thread ?? this.thread,
    pinInfo: pinInfo ?? this.pinInfo,
  );
}