bytes static method

Future<UShareResult> bytes(
  1. Uint8List bytes, {
  2. required String name,
  3. String? mimeType,
  4. String? text,
  5. String? subject,
  6. Rect? origin,
})

Shares bytes as a file called name; no temp file handling needed. UShare.bytes(pdfBytes, name: "invoice.pdf")

Implementation

static Future<UShareResult> bytes(Uint8List bytes, {required String name, String? mimeType, String? text, String? subject, Rect? origin}) => UShareChannel.share(
  files: <UShareFile>[UShareFile.bytes(bytes, name: name, mimeType: mimeType)],
  text: text,
  subject: subject,
  origin: origin,
);