TrackedEntityInstance constructor

TrackedEntityInstance({
  1. String? id,
  2. String? name,
  3. String? created,
  4. String? lastUpdated,
  5. required String orgUnit,
  6. required bool dirty,
  7. required String trackedEntityType,
  8. String? trackedEntityInstance,
  9. bool? deleted,
  10. bool? synced,
  11. bool? syncFailed,
  12. TrackedEntityInstanceImportSummary? lastSyncSummary,
  13. String? lastSyncDate,
  14. bool? inactive,
  15. List<Enrollment>? enrollments,
  16. List<TrackedEntityAttributeValue>? attributes,
  17. bool? transfer,
  18. bool? saved,
  19. List<TrackedEntityInstanceRelationship>? relationships,
  20. bool? skipDateUpdate,
})

Implementation

TrackedEntityInstance(
    {String? id,
    String? name,
    String? created,
    String? lastUpdated,
    required this.orgUnit,
    required bool dirty,
    required this.trackedEntityType,
    this.trackedEntityInstance,
    this.deleted,
    this.synced,
    this.syncFailed,
    this.lastSyncSummary,
    this.lastSyncDate,
    this.inactive,
    this.enrollments,
    this.attributes,
    this.transfer,
    this.saved,
    this.relationships,
    bool? skipDateUpdate})
    : super(
          id: id,
          name: name,
          created: created,
          lastUpdated: lastUpdated,
          skipDateUpdate: skipDateUpdate,
          dirty: dirty) {
  this.trackedEntityInstance = this.trackedEntityInstance ?? this.id;
  this.saved = this.saved ?? false;
}