Support download zip on web

This commit is contained in:
2023-09-16 20:11:05 +08:00
parent 9fea3946ca
commit 743aa42d34
6 changed files with 55 additions and 5 deletions

View File

@@ -4,3 +4,7 @@ void saveFileWeb(
Uint8List data, String mimeType, String filenameWithoutExtension) {
throw UnimplementedError();
}
void saveUriWeb(String uri) {
throw UnimplementedError();
}

View File

@@ -26,3 +26,9 @@ void saveFileWeb(
a.click();
Url.revokeObjectUrl(url);
}
void saveUriWeb(String uri) {
final a = document.createElement("a") as AnchorElement;
a.href = uri;
a.click();
}