exportPdf method

Future<Uint8List> exportPdf({
  1. String? title,
  2. String? subtitle,
  3. double pixelRatio = 3,
  4. PdfPageFormat pageFormat = PdfPageFormat.a4,
})

PDF with an embedded chart image and optional header text.

Implementation

Future<Uint8List> exportPdf({
  String? title,
  String? subtitle,
  double pixelRatio = 3,
  PdfPageFormat pageFormat = PdfPageFormat.a4,
}) async {
  await _ensureFrame();
  return ChartExport.toPdf(
    repaintBoundaryKey,
    title: title,
    subtitle: subtitle,
    pixelRatio: pixelRatio,
    pageFormat: pageFormat,
  );
}