UploadProps class

文件上传字段配置

Constructors

UploadProps({List<String>? allowedTypes, int? maxFileSize, int? maxFiles = -1, String? uploadUrl, FileListType fileListType = FileListType.card, FileSource fileSource = FileSource.all, bool autoUpload = true, bool isRemoveFailFile = false, Future<FileUploadModel?> customUpload(String filePath, dynamic onProgress(double))?, Widget customAreaContent(VoidCallback onTap)?, dynamic onFileChange(FileUploadModel currentFile, List<FileUploadModel> selectedFiles, String action)?, dynamic onUploadProgress(FileUploadModel file, double progress)?, dynamic onUploadSuccess(FileUploadModel file)?, dynamic onUploadFailed(FileUploadModel file, String error)?})
const

Properties

allowedTypes List<String>?
final
autoUpload bool
final
customAreaContent Widget Function(VoidCallback onTap)?
自定义上传区域内容(当 fileListType 为 custom 时使用)
final
customUpload Future<FileUploadModel?> Function(String filePath, dynamic onProgress(double))?
final
fileListType FileListType
final
fileSource FileSource
final
hashCode int
The hash code for this object.
no setterinherited
isRemoveFailFile bool
final
maxFiles int?
final
maxFileSize int?
final
onFileChange → dynamic Function(FileUploadModel currentFile, List<FileUploadModel> selectedFiles, String action)?
参数3: 操作类型 ('add' 或 'remove')
final
onUploadFailed → dynamic Function(FileUploadModel file, String error)?
上传失败回调
final
onUploadProgress → dynamic Function(FileUploadModel file, double progress)?
上传进度回调
final
onUploadSuccess → dynamic Function(FileUploadModel file)?
上传成功回调
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uploadUrl String?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited