StringAttachment constructor

StringAttachment(
  1. String _data, {
  2. String? contentType,
  3. String? fileName,
})

Implementation

StringAttachment(this._data, {String? contentType, String? fileName}) {
  this.contentType = contentType ??
      mime.lookupMimeType(fileName ?? 'abc.txt',
          headerBytes: convert.utf8.encode(_data)) ??
      'text/plain';
  this.fileName = fileName;
}