copyWith method

ChatMessage copyWith({
  1. String? text,
  2. ChatMedia? chatMedia,
  3. bool? isSender,
  4. DateTime? createdAt,
})

Implementation

ChatMessage copyWith({
  String? text,
  ChatMedia? chatMedia,
  bool? isSender,
  DateTime? createdAt,
}) {
  return ChatMessage(
    text: text ?? this.text,
    chatMedia: chatMedia ?? this.chatMedia,
    isSender: isSender ?? this.isSender,
    createdAt: createdAt ?? this.createdAt,
  );
}