createFile static method
Implementation
static createFile({required String path, String? name}) async {
File? file;
await window.fetch(path).then((r) async {
Blob blob = await r.blob();
file = File([blob], name ?? path.toString(), {'type': blob.type});
});
return file;
}