UploadFile constructor

UploadFile({
  1. File? file,
  2. String? filePath,
  3. Uint8List? fileBytes,
  4. required String fieldName,
  5. String? fileName,
  6. String? contentType,
})

Implementation

UploadFile({
  this.file,
  this.filePath,
  this.fileBytes,
  required this.fieldName,
  this.fileName,
  this.contentType,
}) : assert(
        file != null || filePath != null || fileBytes != null,
        '必须提供 file、filePath 或 fileBytes 之一',
      );