FileAttachment constructor

FileAttachment(
  1. File _file, {
  2. String? contentType,
  3. String? fileName,
})

Implementation

FileAttachment(this._file, {String? contentType, String? fileName}) {
  this.contentType = contentType ??
      mime.lookupMimeType(_file.path) ??
      'application/octet-stream';
  this.fileName = fileName ?? basename(_file.path);
}