Refactor blob creation in file download to enhance readability
This commit is contained in:
@@ -354,7 +354,9 @@ class _FileExplorerState extends State<FileExplorer> {
|
||||
final bytes = response.bodyBytes;
|
||||
final blob = web.Blob(
|
||||
[bytes.toJS].toJS,
|
||||
web.BlobPropertyBag(type: response.headers['content-type'] ?? 'application/octet-stream'),
|
||||
web.BlobPropertyBag(
|
||||
type: response.headers['content-type'] ?? 'application/octet-stream',
|
||||
),
|
||||
);
|
||||
final blobUrl = web.URL.createObjectURL(blob);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user