FileUploadField constructor

const FileUploadField({
  1. Key? key,
  2. String? label,
  3. List<UploadedFile>? value,
  4. ValueChanged<List<UploadedFile>?>? onChanged,
  5. FormFieldValidator<List<UploadedFile>>? validator,
  6. InputDecoration? decoration,
  7. UploadMode uploadMode = UploadMode.single,
  8. FileSource fileSource = FileSource.all,
  9. List<FileType> allowedTypes = const [FileType.any],
  10. List<String>? allowedExtensions,
  11. int? maxFiles,
  12. int? maxFileSize,
  13. int? minFileSize,
  14. UploadStrategy uploadStrategy = UploadStrategy.immediate,
  15. FileProcessingOptions processingOptions = const FileProcessingOptions(),
  16. bool enableAIAnalysis = false,
  17. bool enableOCR = false,
  18. bool enableAutoTagging = false,
  19. bool enableDuplicateDetection = false,
  20. bool enableImageEnhancement = false,
  21. SecurityOptions securityOptions = const SecurityOptions(),
  22. bool enableClientSideEncryption = false,
  23. String? encryptionKey,
  24. CloudStorageConfig? cloudConfig,
  25. bool enableMultiCloudSync = false,
  26. List<CloudStorageConfig>? syncProviders,
  27. double? height,
  28. double? width,
  29. Widget? uploadIcon,
  30. String? uploadText,
  31. String? uploadHint,
  32. Color? uploadAreaColor,
  33. Color? borderColor,
  34. double? borderRadius,
  35. bool showUploadProgress = true,
  36. bool showFileSize = true,
  37. bool showFileInfo = true,
  38. bool showAdvancedInfo = false,
  39. bool enablePreview = true,
  40. double? previewHeight,
  41. double? previewWidth,
  42. bool enableFullScreenPreview = true,
  43. Widget customPreviewBuilder(
    1. UploadedFile file
    )?,
  44. bool showThumbnails = true,
  45. double? thumbnailSize,
  46. bool enableImageFilters = false,
  47. bool enableVideoPreview = false,
  48. bool enableAudioWaveform = false,
  49. bool enableDocumentPreview = false,
  50. bool enableDragDrop = true,
  51. bool enableMultiSelectDrag = false,
  52. bool enableGestureControls = false,
  53. String? dragDropText,
  54. Color? dragDropColor,
  55. bool enablePasteFromClipboard = false,
  56. Future<String?> onUpload(
    1. UploadedFile file
    )?,
  57. Future<bool> beforeUpload(
    1. UploadedFile file
    )?,
  58. VoidCallback? onUploadStart,
  59. VoidCallback? onUploadComplete,
  60. dynamic onUploadError(
    1. String error
    )?,
  61. dynamic onProgressUpdate(
    1. UploadedFile file,
    2. double progress
    )?,
  62. bool enableUrlUpload = false,
  63. bool enableCloudUpload = false,
  64. bool enableScannerUpload = false,
  65. Map<String, String>? uploadHeaders,
  66. int? chunkSize,
  67. bool enableUploadResume = false,
  68. int? maxRetries,
  69. bool enableRealTimeSync = false,
  70. bool enableVersionControl = false,
  71. bool enableComments = false,
  72. bool enableSharing = false,
  73. dynamic onCommentAdded(
    1. UploadedFile file,
    2. String comment
    )?,
  74. dynamic onFileShared(
    1. UploadedFile file,
    2. Map<String, dynamic> shareData
    )?,
  75. bool enableAnalytics = false,
  76. bool enablePerformanceMonitoring = false,
  77. dynamic onAnalyticsEvent(
    1. Map<String, dynamic> analyticsData
    )?,
  78. bool validateFileContent = false,
  79. Future<bool> customValidator(
    1. UploadedFile file
    )?,
  80. Future<UploadedFile> fileProcessor(
    1. UploadedFile file
    )?,
  81. bool enableBackgroundProcessing = false,
  82. String? semanticLabel,
  83. bool enableKeyboardNavigation = true,
  84. Map<String, String>? localizations,
  85. bool enableRTL = false,
  86. Map<String, dynamic>? workflowConfig,
  87. dynamic onWorkflowAction(
    1. UploadedFile file,
    2. String action
    )?,
})

Implementation

const FileUploadField({
  Key? key,
  // Basic Configuration
  this.label,
  this.value,
  this.onChanged,
  this.validator,
  this.decoration,

  // Upload Configuration
  this.uploadMode = UploadMode.single,
  this.fileSource = FileSource.all,
  this.allowedTypes = const [FileType.any],
  this.allowedExtensions,
  this.maxFiles,
  this.maxFileSize,
  this.minFileSize,
  this.uploadStrategy = UploadStrategy.immediate,

  // Advanced Processing
  this.processingOptions = const FileProcessingOptions(),
  this.enableAIAnalysis = false,
  this.enableOCR = false,
  this.enableAutoTagging = false,
  this.enableDuplicateDetection = false,
  this.enableImageEnhancement = false,

  // Security Features
  this.securityOptions = const SecurityOptions(),
  this.enableClientSideEncryption = false,
  this.encryptionKey,

  // Cloud Integration
  this.cloudConfig,
  this.enableMultiCloudSync = false,
  this.syncProviders,

  // UI Configuration
  this.height,
  this.width,
  this.uploadIcon,
  this.uploadText,
  this.uploadHint,
  this.uploadAreaColor,
  this.borderColor,
  this.borderRadius,
  this.showUploadProgress = true,
  this.showFileSize = true,
  this.showFileInfo = true,
  this.showAdvancedInfo = false,

  // Advanced Preview Features
  this.enablePreview = true,
  this.previewHeight,
  this.previewWidth,
  this.enableFullScreenPreview = true,
  this.customPreviewBuilder,
  this.showThumbnails = true,
  this.thumbnailSize,
  this.enableImageFilters = false,
  this.enableVideoPreview = false,
  this.enableAudioWaveform = false,
  this.enableDocumentPreview = false,

  // Drag & Drop & Gestures
  this.enableDragDrop = true,
  this.enableMultiSelectDrag = false,
  this.enableGestureControls = false,
  this.dragDropText,
  this.dragDropColor,
  this.enablePasteFromClipboard = false,

  // Advanced Upload Features
  this.onUpload,
  this.beforeUpload,
  this.onUploadStart,
  this.onUploadComplete,
  this.onUploadError,
  this.onProgressUpdate,
  this.enableUrlUpload = false,
  this.enableCloudUpload = false,
  this.enableScannerUpload = false,
  this.uploadHeaders,
  this.chunkSize,
  this.enableUploadResume = false,
  this.maxRetries,

  // Collaboration Features
  this.enableRealTimeSync = false,
  this.enableVersionControl = false,
  this.enableComments = false,
  this.enableSharing = false,
  this.onCommentAdded,
  this.onFileShared,

  // Analytics & Monitoring
  this.enableAnalytics = false,
  this.enablePerformanceMonitoring = false,
  this.onAnalyticsEvent,

  // Advanced Validation & Processing
  this.validateFileContent = false,
  this.customValidator,
  this.fileProcessor,
  this.enableBackgroundProcessing = false,

  // Accessibility & Internationalization
  this.semanticLabel,
  this.enableKeyboardNavigation = true,
  this.localizations,
  this.enableRTL = false,

  // Workflow Integration
  this.workflowConfig,
  this.onWorkflowAction,
}) : super(key: key);