sharePdf method

  1. @override
Future<bool> sharePdf(
  1. Uint8List bytes,
  2. String filename,
  3. Rect bounds,
  4. String? subject,
  5. String? body,
  6. List<String>? emails,
)

Displays a platform popup to share the Pdf document to another application.

subject will be the email subject if selected application is email.

body will be the extra text that can be shared along with the Pdf document. For email application body will be the email body text.

emails will be the list of emails to which you want to share the Pdf document. If the selected application is email application then the these emails will be filled in the to address.

subject and body will only work for Android and iOS platforms. emails will only work for Android Platform.

Implementation

@override
Future<bool> sharePdf(
  Uint8List bytes,
  String filename,
  Rect bounds,
  String? subject,
  String? body,
  List<String>? emails,
) async {
  return _getPdf(bytes, filename: filename);
}