getLocalFileWindows static method

Future<File> getLocalFileWindows(
  1. String url
)

Retrieves a local file reference for Windows, based on a given URL. The file is expected to be in the system's downloads directory.

Implementation

static Future<File> getLocalFileWindows(String url) async {
  final directory = await getDownloadsDirectory();
  final filename = url.split('/').last;
  return File('${directory?.path}/Update Center/$filename');
}