mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
17 lines
430 B
Dart
17 lines
430 B
Dart
// ignore: avoid_web_libraries_in_flutter
|
|
import 'dart:html' as html;
|
|
// ignore: avoid_web_libraries_in_flutter
|
|
import 'dart:js' as js;
|
|
import 'dart:typed_data';
|
|
|
|
import 'package:nc_photos/platform/file_saver.dart' as itf;
|
|
|
|
class FileSaver extends itf.FileSaver {
|
|
@override
|
|
saveFile(String filename, Uint8List content) async {
|
|
js.context.callMethod("webSaveAs", [
|
|
html.Blob([content]),
|
|
filename,
|
|
]);
|
|
}
|
|
}
|