getDownloadsDirectoryPath static method
获取下载目录路径
Implementation
static Future<String> getDownloadsDirectoryPath() async {
if (Platform.isAndroid) {
final Directory? downloadsDir = await getExternalStorageDirectory();
return downloadsDir!.path;
} else {
final Directory? downloadsDir = await getDownloadsDirectory();
return downloadsDir!.path;
}
}