Event constructor

Event({
  1. String? id,
  2. String? name,
  3. String? created,
  4. String? lastUpdated,
  5. String? event,
  6. required String orgUnit,
  7. required String status,
  8. required dynamic dirty,
  9. String? eventDate,
  10. String? dueDate,
  11. bool? deleted,
  12. bool? synced,
  13. bool? syncFailed,
  14. EventImportSummary? lastSyncSummary,
  15. String? lastSyncDate,
  16. String? storedBy,
  17. String? coordinate,
  18. String? trackedEntityInstance,
  19. String? attributeCategoryOptions,
  20. String? attributeOptionCombo,
  21. String? notes,
  22. bool? saved,
  23. String? eventType,
  24. required dynamic programStage,
  25. dynamic enrollment,
  26. List<EventDataValue>? dataValues,
})

Implementation

Event(
    {String? id,
    String? name,
    String? created,
    String? lastUpdated,
    this.event,
    required this.orgUnit,
    required this.status,
    required dirty,
    this.eventDate,
    this.dueDate,
    this.deleted,
    this.synced,
    this.syncFailed,
    this.lastSyncSummary,
    this.lastSyncDate,
    this.storedBy,
    this.coordinate,
    this.trackedEntityInstance,
    this.attributeCategoryOptions,
    this.attributeOptionCombo,
    this.notes,
    this.saved,
    this.eventType,
    required this.programStage,
    this.enrollment,
    this.dataValues})
    : super(
          id: id,
          name: name,
          created: created,
          lastUpdated: lastUpdated,
          dirty: dirty) {
  this.event = this.event ?? this.id;
  this.name = this.name ?? this.event;
  this.saved = this.saved ?? false;
}