downloadsDirectory property
Returns a path to the downloads directory.
Implementation
Future<Directory> get downloadsDirectory async {
if (_downloadDirectory != null) {
return _downloadDirectory!;
}
String path;
if (PlatformUtils.isMobile) {
path = (await getTemporaryDirectory()).path;
} else {
path = (await getDownloadsDirectory())!.path;
}
_downloadDirectory = Directory('$path${Config.downloads}');
return _downloadDirectory!;
}