copyWith method

PeamanMessage copyWith({
  1. String? id,
  2. String? chatId,
  3. String? text,
  4. String? senderId,
  5. List<String>? receiverId,
  6. String? extraId,
  7. List<PeamanFileUrl>? files,
  8. PeamanMessageType? type,
  9. int? createdAt,
  10. int? updatedAt,
  11. bool? visibility,
  12. Map<String, dynamic>? extraData,
})

Implementation

PeamanMessage copyWith({
  final String? id,
  final String? chatId,
  final String? text,
  final String? senderId,
  final List<String>? receiverId,
  final String? extraId,
  final List<PeamanFileUrl>? files,
  final PeamanMessageType? type,
  final int? createdAt,
  final int? updatedAt,
  final bool? visibility,
  final Map<String, dynamic>? extraData,
}) {
  return PeamanMessage(
    id: id ?? this.id,
    chatId: chatId ?? this.chatId,
    text: text ?? this.text,
    files: files ?? this.files,
    senderId: senderId ?? this.senderId,
    type: type ?? this.type,
    receiverIds: receiverId ?? this.receiverIds,
    extraId: extraId ?? this.extraId,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
    visibility: visibility ?? this.visibility,
    extraData: extraData ?? this.extraData,
  );
}