AddFileAttachmentWithContent method

FileAttachment AddFileAttachmentWithContent(
  1. String name,
  2. Uint8List content
)
Adds a file attachment to the collection. The display name of the new attachment. A byte arrays representing the content of the attachment.

Implementation

FileAttachment AddFileAttachmentWithContent(String name, Uint8List content) {
  FileAttachment fileAttachment = new FileAttachment.withOwner(this._owner!);
  fileAttachment.Name = name;
  fileAttachment.Content = content;

  this.InternalAdd(fileAttachment);

  return fileAttachment;
}