FileResource constructor

FileResource({
  1. String? id,
  2. required String elementId,
  3. required String formInstance,
  4. required String elementType,
  5. String? resourceId,
  6. String? name,
  7. required String contentType,
  8. String? contentLength,
  9. required String? storageStatus,
  10. required String localFilePath,
  11. bool? synced,
  12. bool? syncFailed,
  13. String? lastSyncSummary,
  14. String? lastSyncDate,
  15. String? created,
  16. String? lastUpdated,
  17. required bool dirty,
})

Implementation

FileResource(
    {String? id,
    required this.elementId,
    required this.formInstance,
    required this.elementType,
    this.resourceId,
    String? name,
    required this.contentType,
    this.contentLength,
    required this.storageStatus,
    required this.localFilePath,
    this.synced,
    this.syncFailed,
    this.lastSyncSummary,
    this.lastSyncDate,
    String? created,
    String? lastUpdated,
    required bool dirty})
    : super(
          id: id,
          name: name,
          dirty: dirty,
          created: created,
          lastUpdated: lastUpdated) {
  this.id = this.id ?? '${this.formInstance}_${this.elementId}';
  this.name = this.name ?? this.localFilePath;
}