Soru/moor

This commit is contained in:
Sorunome 2020-05-13 13:58:59 +00:00 committed by Christian Pauly
commit f594c7005d
55 changed files with 1034 additions and 1133 deletions

View file

@ -15,8 +15,8 @@ extension MatrixFileExtension on MatrixFile {
var element = html.document.createElement('a');
element.setAttribute(
'href', html.Url.createObjectUrlFromBlob(html.Blob([bytes])));
element.setAttribute('target', "_blank");
element.setAttribute('rel', "noopener");
element.setAttribute('target', '_blank');
element.setAttribute('rel', 'noopener');
element.setAttribute('download', fileName);
element.setAttribute('type', mimeType);
element.style.display = 'none';
@ -24,8 +24,8 @@ extension MatrixFileExtension on MatrixFile {
element.click();
element.remove();
} else {
Directory tempDir = await getTemporaryDirectory();
final file = File(tempDir.path + "/" + path.split("/").last);
var tempDir = await getTemporaryDirectory();
final file = File(tempDir.path + '/' + path.split('/').last);
file.writeAsBytesSync(bytes);
await OpenFile.open(file.path);
}