openPdfInNewTab static method
Implementation
static void openPdfInNewTab(Uint8List? pdfBytes, String pdfName) {
if (pdfBytes == null) return;
final blob = html.Blob([pdfBytes], 'application/pdf');
final url = html.Url.createObjectUrl(blob);
final anchor = html.AnchorElement(href: url)
..target = '_blank'
..download = '$pdfName.pdf';
anchor.click();
html.Url.revokeObjectUrl(url);
}