getDownloadDirectoryPath static method

Future<String> getDownloadDirectoryPath({
  1. bool saveToDocuments = false,
})

Gets the current download directory path that will be used for downloads

Implementation

static Future<String> getDownloadDirectoryPath(
    {bool saveToDocuments = false}) async {
  if (kIsWeb) {
    return 'Browser Downloads folder (exact path depends on browser settings)';
  }

  final directory = await _getDownloadDirectory(saveToDocuments);
  return directory.path;
}