getExternalStoragePublicDirectory static method
Equivalent to android's Environment.getExternalStoragePublicDirectory(type).getPath(). Return top-level external storage directory for placing files of a particular type example:
final downloadPath = await AndroidExternalStorage.getExternalStoragePublicDirectory(
DirType.downloadDirectory,
);
Implementation
static Future<String?> getExternalStoragePublicDirectory(
_DirType type) async {
if (!Platform.isAndroid) throw UnsupportedError("Only Works in Android");
return await _channel
.invokeMethod(_getExPublicDirectory, {"type": type.type});
}