downloadFile function
Implementation
void downloadFile(Uint8List bytes, String fileName, String mimeType) {
final blob = html.Blob([bytes], mimeType);
final url = html.Url.createObjectUrlFromBlob(blob);
final anchor = html.AnchorElement(href: url)
..setAttribute("download", fileName)
..click();
html.Url.revokeObjectUrl(url);
}