downloadFile static method
Downloads a file from the provided url.
Implementation
static Future<void> downloadFile(String url, String name) async {
  final Response response = await (await PlatformUtils.dio).head(url);
  if (response.statusCode != 200) {
    throw Exception('Cannot download file');
  }
  final web.HTMLAnchorElement anchorElement = web.HTMLAnchorElement()
    ..href = url;
  anchorElement.download = name;
  anchorElement.click();
}