copyWith method
PeamanMessage
copyWith(
{ - String? id,
- String? chatId,
- String? text,
- String? senderId,
- List<String>? receiverId,
- List<PeamanFileUrl>? files,
- PeamanMessageType? type,
- int? createdAt,
- int? updatedAt,
- bool? visibility,
})
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,
);
}