FileUploadField constructor
const
FileUploadField({
- Key? key,
- String? label,
- List<
UploadedFile> ? value, - ValueChanged<
List< ? onChanged,UploadedFile> ?> - FormFieldValidator<
List< ? validator,UploadedFile> > - InputDecoration? decoration,
- UploadMode uploadMode = UploadMode.single,
- FileSource fileSource = FileSource.all,
- List<
FileType> allowedTypes = const [FileType.any], - List<
String> ? allowedExtensions, - int? maxFiles,
- int? maxFileSize,
- int? minFileSize,
- UploadStrategy uploadStrategy = UploadStrategy.immediate,
- FileProcessingOptions processingOptions = const FileProcessingOptions(),
- bool enableAIAnalysis = false,
- bool enableOCR = false,
- bool enableAutoTagging = false,
- bool enableDuplicateDetection = false,
- bool enableImageEnhancement = false,
- SecurityOptions securityOptions = const SecurityOptions(),
- bool enableClientSideEncryption = false,
- String? encryptionKey,
- CloudStorageConfig? cloudConfig,
- bool enableMultiCloudSync = false,
- List<
CloudStorageConfig> ? syncProviders, - double? height,
- double? width,
- Widget? uploadIcon,
- String? uploadText,
- String? uploadHint,
- Color? uploadAreaColor,
- Color? borderColor,
- double? borderRadius,
- bool showUploadProgress = true,
- bool showFileSize = true,
- bool showFileInfo = true,
- bool showAdvancedInfo = false,
- bool enablePreview = true,
- double? previewHeight,
- double? previewWidth,
- bool enableFullScreenPreview = true,
- Widget customPreviewBuilder(
- UploadedFile file
- bool showThumbnails = true,
- double? thumbnailSize,
- bool enableImageFilters = false,
- bool enableVideoPreview = false,
- bool enableAudioWaveform = false,
- bool enableDocumentPreview = false,
- bool enableDragDrop = true,
- bool enableMultiSelectDrag = false,
- bool enableGestureControls = false,
- String? dragDropText,
- Color? dragDropColor,
- bool enablePasteFromClipboard = false,
- Future<
String?> onUpload(- UploadedFile file
- Future<
bool> beforeUpload(- UploadedFile file
- VoidCallback? onUploadStart,
- VoidCallback? onUploadComplete,
- dynamic onUploadError(
- String error
- dynamic onProgressUpdate(
- UploadedFile file,
- double progress
- bool enableUrlUpload = false,
- bool enableCloudUpload = false,
- bool enableScannerUpload = false,
- Map<
String, String> ? uploadHeaders, - int? chunkSize,
- bool enableUploadResume = false,
- int? maxRetries,
- bool enableRealTimeSync = false,
- bool enableVersionControl = false,
- bool enableComments = false,
- bool enableSharing = false,
- dynamic onCommentAdded(
- UploadedFile file,
- String comment
- bool enableAnalytics = false,
- bool enablePerformanceMonitoring = false,
- dynamic onAnalyticsEvent()?,
- bool validateFileContent = false,
- Future<
bool> customValidator(- UploadedFile file
- Future<
UploadedFile> fileProcessor(- UploadedFile file
- bool enableBackgroundProcessing = false,
- String? semanticLabel,
- Map<
String, String> ? localizations, - bool enableRTL = false,
- Map<
String, dynamic> ? workflowConfig, - dynamic onWorkflowAction(
- UploadedFile file,
- 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);