getDownloadPath static method
Implementation
static Future<String?> getDownloadPath() async {
Directory? directory;
if (Platform.isIOS) {
directory = await getApplicationDocumentsDirectory();
} else {
directory = Directory('/storage/emulated/0/Download');
if (!await directory.exists()) {
directory = await getExternalStorageDirectory();
}
}
return directory?.path;
}