PdfAttachment.fromBase64String constructor

PdfAttachment.fromBase64String(
  1. String fileName,
  2. String base64String, {
  3. String? description,
  4. String? mimeType,
})

Initializes a new instance of the PdfAttachment class with specified file name and byte data as base64 String to be attached.

Implementation

PdfAttachment.fromBase64String(String fileName, String base64String,
    {String? description, String? mimeType})
    : super(fileName, base64.decode(base64String)) {
  _embeddedFile =
      PdfEmbeddedFileSpecificationHelper.getHelper(this).embeddedFile;
  _updateValues(description, mimeType);
}