UploadFile.fromFile constructor

const UploadFile.fromFile({
  1. required String fieldName,
  2. required File file,
  3. String? filename,
  4. String contentType = 'application/octet-stream',
})

Implementation

const UploadFile.fromFile({
  required this.fieldName,
  required File this.file,
  String? filename,
  this.contentType = 'application/octet-stream',
})  : bytes = null,
      filename = filename ?? '';