CustomInteractiveMessage constructor

CustomInteractiveMessage({
  1. required Map<String, dynamic> customData,
  2. required String subType,
  3. dynamic tags,
  4. int? id,
  5. String? muid,
  6. User? sender,
  7. AppEntity? receiver,
  8. required String receiverUid,
  9. String type = MessageTypeConstants.customInteractive,
  10. required String receiverType,
  11. String? category = MessageCategoryConstants.interactive,
  12. DateTime? sentAt,
  13. DateTime? deliveredAt,
  14. DateTime? readAt,
  15. Map<String, dynamic>? metadata,
  16. DateTime? readByMeAt,
  17. DateTime? deliveredToMeAt,
  18. DateTime? deletedAt,
  19. DateTime? editedAt,
  20. String? deletedBy,
  21. String? editedBy,
  22. DateTime? updatedAt,
  23. String? conversationId,
  24. int? parentMessageId,
  25. int? replyCount,
})

Creates a new CustomInteractiveMessage instance. The rest of the parameters are optional and are inherited from InteractiveMessage.

Implementation

CustomInteractiveMessage({
  required this.customData,
  required this.subType,
  tags,
  int? id,
  String? muid,
  super.sender,
  super.receiver,
  required super.receiverUid,
  super.type = MessageTypeConstants.customInteractive,
  required super.receiverType,
  String? category = MessageCategoryConstants.interactive,
  super.sentAt,
  super.deliveredAt,
  super.readAt,
  super.metadata,
  super.readByMeAt,
  super.deliveredToMeAt,
  super.deletedAt,
  super.editedAt,
  super.deletedBy,
  super.editedBy,
  super.updatedAt,
  super.conversationId,
  int? parentMessageId,
  int? replyCount,
}) : super(
          id: id ?? 0,
          muid: muid ?? '',
          parentMessageId: parentMessageId ?? 0,
          replyCount: replyCount ?? 0,
          interactiveData: {
            ModelFieldConstants.customData: customData,
          });