SchedulerMessage constructor

SchedulerMessage({
  1. String? title,
  2. String? avatarUrl,
  3. String? goalCompletionText,
  4. String? timezoneCode,
  5. int? bufferTime,
  6. int? duration,
  7. Map<String, List<TimeRange>>? availability,
  8. String? dateRangeStart,
  9. String? dateRangeEnd,
  10. String? icsFileUrl,
  11. ButtonElement? scheduleElement,
  12. required String receiverUid,
  13. required String receiverType,
  14. dynamic tags,
  15. int? id,
  16. String? muid,
  17. User? sender,
  18. AppEntity? receiver,
  19. String type = MessageTypeConstants.scheduler,
  20. String? category = MessageCategoryConstants.interactive,
  21. DateTime? sentAt,
  22. DateTime? deliveredAt,
  23. DateTime? readAt,
  24. Map<String, dynamic>? metadata,
  25. DateTime? readByMeAt,
  26. DateTime? deliveredToMeAt,
  27. DateTime? deletedAt,
  28. DateTime? editedAt,
  29. String? deletedBy,
  30. String? editedBy,
  31. DateTime? updatedAt,
  32. String? conversationId,
  33. int? parentMessageId,
  34. int? replyCount,
  35. InteractionGoal? interactionGoal,
  36. List<Interaction>? interactions,
  37. bool? allowSenderInteraction,
})

Implementation

SchedulerMessage(
    {this.title,
    this.avatarUrl,
    this.goalCompletionText,
    this.timezoneCode,
    this.bufferTime,
    this.duration,
    this.availability,
    this.dateRangeStart,
    this.dateRangeEnd,
    this.icsFileUrl,
    this.scheduleElement,
    required super.receiverUid,
    required super.receiverType,
    tags,
    int? id,
    String? muid,
    super.sender,
    super.receiver,
    super.type = MessageTypeConstants.scheduler,
    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,
    InteractionGoal? interactionGoal,
    super.interactions,
    bool? allowSenderInteraction})
    : super(
          id: id ?? 0,
          muid: muid ?? '',
          parentMessageId: parentMessageId ?? 0,
          replyCount: replyCount ?? 0,
          interactionGoal: interactionGoal ??
              InteractionGoal(type: InteractionGoalTypeConstants.anyAction),
          allowSenderInteraction: allowSenderInteraction ?? false,
          interactiveData: {
            ModelFieldConstants.title: title,
            ModelFieldConstants.avatarUrl: avatarUrl,
            ModelFieldConstants.goalCompletionText: goalCompletionText,
            ModelFieldConstants.timezoneCode: timezoneCode,
            ModelFieldConstants.bufferTime: bufferTime,
            ModelFieldConstants.duration: duration,
            ModelFieldConstants.availability:
                SchedulerUtils.getAvailabilityJson(availability),
            ModelFieldConstants.dateRangeStart: dateRangeStart,
            ModelFieldConstants.dateRangeEnd: dateRangeEnd,
            ModelFieldConstants.icsFileUrl: icsFileUrl,
            ModelFieldConstants.scheduleElement: scheduleElement?.toMap(),
          });