TRON -> TRON_MAINNET

This commit is contained in:
Stephan D
2026-02-01 03:35:16 +01:00
parent be3fd6075f
commit 8faed5cbaa
28 changed files with 452 additions and 90 deletions

View File

@@ -0,0 +1,25 @@
import 'dart:typed_data';
import 'package:universal_html/html.dart' as html;
import 'package:pshared/models/file/downloaded_file.dart';
Future<void> downloadFile(DownloadedFile file) async {
final blob = html.Blob(
[Uint8List.fromList(file.bytes)],
file.mimeType,
);
final url = html.Url.createObjectUrlFromBlob(blob);
final anchor = html.AnchorElement(href: url)
..download = file.filename
..style.display = 'none';
html.document.body!.append(anchor);
anchor.click();
anchor.remove();
html.Url.revokeObjectUrl(url);
}