toAttachmentFile property

Future<AttachmentFile> toAttachmentFile

Converts the PlatformFile into AttachmentFile

Implementation

Future<AttachmentFile> get toAttachmentFile async {
  final bytes = await readAsBytes();
  return AttachmentFile(
    name: name,
    size: bytes.length,
    path: path,
    bytes: bytes,
  );
}